Преглед изворни кода

Merge remote-tracking branch 'origin/feature-material-wangcz' into feature-material-wangcz

yujia пре 7 година
родитељ
комит
108e16b7b8

+ 0 - 3
src/main/webapp/resources/js/common/services.js

@@ -875,9 +875,6 @@ define([ 'angular', 'common/utils', 'big'], function(angular, utils, Big) {
 		}
 
 		return function (num, fractionSize) {
-			if(num == 1) {
-				console.log(1);
-			}
 			//判断是否是数字,如果不是这返回。
 			if(typeof num !== 'number') {
 				return num;

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

@@ -536,6 +536,12 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
             templateUrl : 'static/view/vendor/forstore/vendor_onSale.html',
             controllerUrl : "app/controllers/forstore/vendor_onSaleCtrl",
             controller : 'vendor_onSaleCtrl'
+        })).state('vendor_storage', angularAMD.route({
+            title : '出入库',
+            url : '/vendor_storage',
+            templateUrl : 'static/view/vendor/forstore/vendor_storage.html',
+            controllerUrl : "app/controllers/forstore/vendor_storageCtrl",
+            controller : 'vendor_storageCtrl'
         })).state('vendor_onSale_erp', angularAMD.route({
 			title : '已上架产品toErp',
 			url : '/vendor_onSale_erp',
@@ -721,40 +727,33 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 
 				if (toState.name === 'vendor_store_apply' && $rootScope.applyStatus !== 'NONE') {
 					event.preventDefault();
-					console.log('route', toState.name, getToStateName());
 					$state.go(getToStateName());
 					return ;
 				}
 
 				if (toState.name == 'vendor_store_wait' && $rootScope.applyStatus !== 'PREPARE') {
 					event.preventDefault();
-					console.log('route', toState.name, getToStateName());
 					$state.go(getToStateName());
 					return ;
 				}
 
 				if (toState.name == 'vendor_store_info' && ($rootScope.applyStatus !== 'PASS' || $rootScope.store)) {
 					event.preventDefault();
-					console.log('route', toState.name, getToStateName());
 					$state.go(getToStateName());
 					return ;
 				}
 
 				if (toState.name == 'vendor_store_maintain' && (!$rootScope.store || ($rootScope.store && $rootScope.store.status && $rootScope.store.status !== 'OPENED'))) {
 					event.preventDefault();
-					console.log('route', toState.name, getToStateName());
 					$state.go(getToStateName());
 					return ;
 				}
 
 				if (toState.name == 'vendor_store_close' && (!$rootScope.store || ($rootScope.store && (!$rootScope.store.status || $rootScope.store.status === 'OPENED')))) {
 					event.preventDefault();
-					console.log('route', toState.name, getToStateName());
 					$state.go(getToStateName());
 					return ;
 				}
-				console.log('route', toState.name);
-
 			});
 
 		})['catch'](function () {

+ 2109 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_storageCtrl.js

@@ -0,0 +1,2109 @@
+define([ 'app/app' ], function(app) {
+    'use strict';
+    app.register.controller('vendor_storageCtrl', ['$scope', '$rootScope', 'Goods', '$modal', 'toaster', 'Loading', 'StoreInfo', 'AuthenticationService', '$q', 'StoreCms', 'NumberService', 'Enterprise', 'ByteCountService', 'DistributionRule', '$upload', '$http', function ($scope, $rootScope, Goods, $modal, toaster, Loading, StoreInfo, AuthenticationService, $q, StoreCms, NumberService, Enterprise, ByteCountService, DistributionRule, $upload, $http) {
+        $rootScope.active = 'vendor_storage';
+        $scope.keyword = '';
+        $scope.tab = 'storage';
+        $scope.isInt = /^[0-9]*[1-9][0-9]*$/;
+        document.title = '卖家出入库-优软商城';
+        $scope.storage_tab = 'inPut';
+
+        // 更多操作数据和记录
+        $scope.handleLink = [
+            {name: '查看入库记录', tab: 'inPut', id: 0},
+            {name: '其它入库', tab: 'inPut', id: 1},
+            {name: '采购入库', tab: 'inPut', id: 2},
+            {name: '查看出库记录', tab: 'outPut', id: 0},
+            {name: '其它出库', tab: 'outPut', id: 1},
+            {name: '销售出库', tab: 'outPut', id: 2}];
+        // $scope.handleItem = $scope.storage_tab === 'inPut'? $scope.handleLink[0].id : $scope.handleLink[3].id;
+        $scope.handleItem = 1;
+
+
+        $scope.lockData = [
+            {seleted: false, maiName: '324134', selfSupport: '腌肉入库', uuid: '张三1', date: 340325435434535, content: [{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'}]},
+            {seleted: false, maiName: '324134', selfSupport: '腌肉入库', uuid: '张三2', date: 34032545354325432, content: [{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'}]},
+            {seleted: false, maiName: '324134', selfSupport: '腌肉入库', uuid: '张三3', date: 340324535454325432, content: [{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'}]},
+            {seleted: false, maiName: '324134', selfSupport: '腌肉入库', uuid: '张三4', date: 340323554325432, content: [{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'},{code: 'w324', code1: '342', code2: '2144'}]}
+        ];
+
+        //数字的正则表达式
+        var intPattern = /^[1-9]+$/;
+
+        $scope.packageArray = ["Bulk-散装", "Reel-卷装", "Tape/Reel-编带", "Tray-盘装",
+            "Tube-管装", "盒装", "袋装", "罐装", "瓶装", "桶装", "箱装", "其他"];
+
+        //只包含中文和英文的字符
+        var pattern = /^[\u4e00-\u9fa5a-zA-Z]+$/;
+
+        $scope.param = {
+            page : 1,
+            count : 10,
+            sorting : {
+                createdDate: 'DESC'
+            },
+            status : "601-602"
+        };
+
+        /**
+         * 最大
+         * @type {number}
+         */
+        $scope.maxReserve = 999999999;
+        /**
+         * 最小包装量的最大值
+         */
+        $scope.maxPackQty = 999999;
+        $scope.minReserve = 1;
+
+        // 商品分页数据
+        $scope.goodsPageParams = {};
+        $scope.selfSupportType = {
+            ALL: '全部类型',
+            SELF_SUPPORT: '其它入库',
+            CONSIGNMENT: '采购入库'
+        };
+
+        // 时间域选择
+        $scope.dateArea = 'All'
+
+        $scope.selfSupport = $scope.selfSupportType.ALL;
+
+        $scope.onsale = {};
+
+        // 清空数据
+        var clearRecordParams = function () {
+            $scope.dateArea = 'All'
+            $scope.keyword = null;
+            $scope.startDate = null;
+            $scope.endDate = null;
+        };
+
+        //出入库切换
+        $scope.toggleStorage = function (type) {
+            $scope.storage_tab = type
+        };
+
+
+        // 操作类型切换
+        $scope.toggleType = function (type) {
+            $scope.handleItem = type.id;
+            clearRecordParams()
+        };
+
+        // 时间格式化
+        var _formatDate = function (date, fmt) {
+            if(!date) {
+                return null;
+            }
+            if (typeof date === 'string') {
+                date = new Date(Date.parse(date.replace(/-/g, '/')));
+            }
+            var o = {
+                'M+': date.getMonth() + 1,
+                'd+': date.getDate(),
+                'h+': date.getHours(),
+                'm+': date.getMinutes(),
+                's+': date.getSeconds(),
+                'q+': Math.floor((date.getMonth() + 4) / 3),
+                's': date.getMilliseconds()
+            }
+            if (/(y+)/.test(fmt)) {
+                fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+            }
+            for (var k in o) {
+                if (new RegExp('(' + k + ')').test(fmt)) {
+                    fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)));
+                }
+            }
+            return fmt;
+        }
+
+        var _getClearDay = function (date) {
+            return new Date(_formatDate(date, 'yyyy-MM-dd')).getTime() - 8 * 60 * 60 * 1000
+        }
+
+        // 时间选择操作
+        $scope.setFilters = function (type, val) {
+            $scope[type] = val;
+            if (type === 'dateArea') {
+                // 时间筛选
+                var currentTime = _getClearDay(new Date());
+                var endDate = new Date(currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+                if (val === 'All' || val === 'autoMonth') {
+                    $scope.startDate = null;
+                    $scope.endDate = null;
+                } else if (val === 'oneMonth') {
+                    $scope.startDate = new Date(currentTime - 30 * 24 * 60 * 60 * 1000);
+                    $scope.endDate = endDate;
+                } else if (val === 'threeMonth') {
+                    $scope.startDate = new Date(currentTime - 3 * 30 * 24 * 60 * 60 * 1000);
+                    $scope.endDate = endDate;
+                } else if (val === 'sixMonth') {
+                    $scope.startDate = new Date(currentTime - 6 * 30 * 24 * 60 * 60 * 1000);
+                    $scope.endDate = endDate;
+                } else {
+                    $scope.startDate = null;
+                    $scope.endDate = null;
+                }
+            }
+        };
+
+        // 初始化时间变量
+        $scope.condition = [];
+        var start = {
+            open : false
+        };
+        var end = {
+            open : false
+        };
+        $scope.condition.push(start);
+        $scope.condition.push(end);
+
+        // 打开日期选择框
+        $scope.openDatePicker = function ($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            openParam === 0 ? $scope.condition[1].open = false : $scope.condition[0].open = false;
+            item[openParam].open = !item[openParam].open;
+        };
+
+        // 日期选择框选择时间显示
+        $scope.onDateCondition = function (bool) {
+          var startTime = $scope.startDate ? $scope.startDate.getTime() : null;
+          var endTime = $scope.endDate ? $scope.endDate.getTime() : null;
+          if (startTime && endTime && startTime > endTime) {
+              if (bool === 1) {
+                  toaster.pop('info', '起始时间不能大于结束时间')
+                  $scope.startDate = null;
+              } else {
+                  toaster.pop('info', '结束时间不能小于起始时间');
+                  $scope.endDate = null;
+              }
+          }
+          if ($scope.endDate && bool === 2) {
+              $scope.endDate = new Date($scope.endDate.getTime() + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000);
+          }
+        };
+
+        $scope.onFocus = function (e) {
+            console.log(e.target)
+        }
+
+        //获取币别信息
+        Enterprise.getCurrencyByRegisterAddress(null, function (data) {
+            if(data.code == 1) {
+                $scope.onsale.currency = data.data;
+            }else {
+                toaster.pop('info', '提示', '您公司的注册地址为空,无法确定币别,系统默认为人民币');
+                $scope.onsale.currency = 'RMB';
+            }
+        }, function (response) {
+            toaster.pop('info', '提示', '获取不到公司的币别信息');
+        });
+
+        //获取登录的信息
+        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;
+            }, function(response) {
+                toaster.pop('error', '获取店铺的信息失败, ' + response.data);
+            });
+        });
+
+        //初始化页数信息
+        $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;
+                }
+            });
+        };
+
+        //输入框监听Enter事件
+        $scope.listenEnter = function () {
+            if($scope.param.currentPage) {
+                if(!intPattern.test($scope.param.currentPage)) {
+                    $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.goodsAll.totalPages) {
+                        page = $scope.goodsAll.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.goodsAll.totalPages) {
+                        page = $scope.goodsAll.totalPages
+                    }else {
+                        page =$scope.param.page + 1;
+                    }
+                    break;
+                case "first":
+                    page = 1;
+                    break;
+                case "last":
+                    page = $scope.goodsAll.totalPages;
+                    break;
+            }
+            if(page == $scope.param.page || page < 1 || page > $scope.goodsAll.totalPages) {
+                $scope.param.currentPage = $scope.param.page;
+                return ;
+            }
+            $scope.param.page = page;
+            loadData();
+        };
+
+        //计算页数的方式。
+        $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);
+            }
+        };
+
+        $scope.onSearch = function () {
+            loadDataReload();
+        };
+
+        var loadData = function () {
+            if ($scope.selfSupport === $scope.selfSupportType.SELF_SUPPORT) {
+                $scope.param.isSelfSupport = true;
+            } else if ($scope.selfSupport === $scope.selfSupportType.CONSIGNMENT) {
+                $scope.param.isSelfSupport = false;
+            } else {
+                $scope.param.isSelfSupport = null;
+            }
+            $scope.param.keyword = $scope.keyword;
+            Goods.getGoodsByPageAndStatus($scope.param, function (data) {
+                $scope.goodsAll = data;
+                $scope.currenctGoods = data.content;
+                if ($scope.currenctGoods.length == 0) {
+                    $scope.chooseAllPage = false;
+                }
+                $scope.param.currentPage = data.number;
+                if ($scope.param.currentPage == data.totalPages) {
+                    $scope.endNumber = data.totalElements;
+                } else {
+                    $scope.endNumber = data.number * data.size;
+                }
+                $scope.acculatePages(data.number, data.totalPages);
+                if($scope.currenctGoods.length > 0) {
+                    //防止默认选择的RMB不是用户上传的币别信息
+                    if($scope.currenctGoods[0].currencyName == 'USD') {
+                        $scope.onsale.currency = 'USD';
+                    }else {
+                        $scope.onsale.currency = 'RMB';
+                    }
+                    angular.forEach($scope.currenctGoods, function (goods) {
+                        if ($scope.chooseAllPage) {
+                            goods.isChoosed = true;
+                        } else {
+                            goods.isChoosed = false;
+                        }
+                    });
+                }
+                $scope.chooseAll = false;
+            });
+        };
+
+        // 全选
+        $scope.chooseAllItem = function () {
+            $scope.chooseAll = !$scope.chooseAll;
+            angular.forEach($scope.currenctGoods, function (goods) {
+                goods.isChoosed = $scope.chooseAll;
+            });
+            if (!$scope.chooseAll) {
+                $scope.chooseAllPage = false;
+            }
+        };
+
+        $scope.turnAllPage = function () {
+            if ($scope.chooseAll) {
+                $scope.chooseAllPage = true;
+            }
+        };
+
+        $scope.cancelAllPage = function () {
+            $scope.chooseAllPage = false;
+            $scope.chooseAll = false;
+            angular.forEach($scope.currenctGoods, function (goods) {
+                goods.isChoosed = false;
+            });
+        };
+
+        // 检查是否全选
+        var checkChoosedAll = function () {
+            $scope.chooseAll = true;
+            angular.forEach($scope.currenctGoods, function (goods) {
+                if (!goods.isChoosed) {
+                    $scope.chooseAll = false;
+                }
+            });
+            if (!$scope.chooseAll) {
+                $scope.chooseAllPage = false;
+            }
+        };
+
+        $scope.isDoubleChecked = false;
+        // 单选
+        $scope.chooseOne = function (event, goods) {
+            if (event) {
+                event.preventDefault();
+                event.stopPropagation();
+                $scope.isDoubleChecked = true;
+            }
+            if (typeof goods.isChoosed == 'undefined' || !goods.isChoosed) {
+                goods.isChoosed = true;
+            } else {
+                goods.isChoosed = false;
+            }
+            if ($scope.isDoubleChecked) {
+                goods.isChoosed = !goods.isChoosed;
+                $scope.isDoubleChecked = false;
+            }
+            checkChoosedAll();
+        };
+
+        //获取选中之后的信息
+        var getChooseBatch = function () {
+            $scope.choosedBatch = [];
+            angular.forEach($scope.currenctGoods, function (goods) {
+                if (goods.isChoosed) {
+                    $scope.choosedBatch.push(goods.batchCode);
+                }
+            });
+        };
+
+        //获取选中之后的信息
+        var getChooseInfo = function () {
+            $scope.choosedIds = [];
+            angular.forEach($scope.currenctGoods, function (goods) {
+                if (goods.isChoosed) {
+                    $scope.choosedIds.push(goods.id);
+                }
+            });
+        };
+
+        $scope.cancelBatch = function (event) {
+            if (event) {
+                event.stopPropagation();
+            }
+            $scope.batchStatus = false;
+        };
+
+        $scope.batchOperation = function (num) {
+            getChooseInfo();
+            if (!$scope.choosedIds || $scope.choosedIds.length == 0) {
+                toaster.pop('info', '您尚未选中任何产品');
+                return ;
+            }
+            $scope.batchStatus = true;
+            $scope.batchType = num;
+            if (num == 1) {
+                $scope.batchTitle = '是否要删除选中的产品?'
+            } else {
+                $scope.batchTitle = '是否要下架选中的产品?'
+            }
+        };
+
+        /**
+         * 批量删除
+         */
+        $scope.batchDelete = function () {
+            if ($scope.chooseAllPage) {
+                Goods.deleteGoodsByEnUU({}, {}, function (result) {
+                    if (result.success) {
+                        var message = "成功删除"+ result.data.success +"个产品,另有"
+                            + result.data.fail + "个产品无法删除";
+                        toaster.pop('success', message);
+                        $scope.batchStatus = false;
+                        loadDataReload();
+                    } else {
+                        toaster.pop('error', result.message);
+                    }
+                })
+            } else {
+                getChooseInfo();
+                if (!$scope.choosedIds || $scope.choosedIds.length == 0) {
+                    toaster.pop("info", "您尚未选中任何产品");
+                    return ;
+                }
+                Goods.deleteGoodsByIdList({}, $scope.choosedIds, function (result) {
+                    if (result.success) {
+                        var message = "成功删除"+ result.data.success +"个产品,另有"
+                            + result.data.fail + "个产品无法删除";
+                        toaster.pop('success', message);
+                        $scope.batchStatus = false;
+                        loadDataReload();
+                    } else {
+                        toaster.pop('error', result.message);
+                    }
+                })
+            }
+        };
+
+        $scope.batchDown = function () {
+            if ($scope.chooseAllPage) {
+                Goods.downNowEnterpriseGoods({}, {}, function(result) {
+                    if (result.success) {
+                        toaster.pop('success', '下架成功');
+                        $scope.batchStatus = false;
+                        loadDataReload();
+                    } else {
+                        toaster.pop('error', result.message);
+                    }
+                });
+            } else {
+                getChooseBatch();
+                if (!$scope.choosedBatch || $scope.choosedBatch.length == 0) {
+                    toaster.pop("info", "您尚未选中任何产品");
+                    return ;
+                }
+                var batchs = $scope.choosedBatch.join(",");
+                Goods.offShelfGoodsByProvider({batchCodes : batchs}, {}, function(map){
+                    if (map.success) {
+                        toaster.pop('success', '下架成功');
+                        $scope.batchStatus = false;
+                        loadDataReload();
+                    } else {
+                        toaster.pop('error', map.message);
+                    }
+                }, function(err){
+                    toaster.pop('error', err.data || '下架失败');
+                });
+            }
+        };
+
+        $scope.updateCommodityInfo = function (commodity) {
+            Goods.offShelfGoodsByProvider({batchCodes : commodity.batchCode}, {}, function(map){
+                if (map.success) {
+                    toaster.pop('success', '下架成功');
+                    $scope.isSoldOut = false;
+                    loadDataReload();
+                } else {
+                    toaster.pop('error', map.message);
+                }
+            }, function(err){
+                toaster.pop('error', err.data || '下架失败');
+            });
+        };
+
+        /*查看大图*/
+        $scope.showImg = function(imgUrl) {
+            var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
+            box.show();
+            box.find('img').attr('src', src);
+            box.find('a').click(function(){
+                box.hide();
+            });
+            box.dblclick(function(){
+                box.hide();
+            });
+        }
+
+        /*******************************编辑库存信息 start****************************************/
+
+        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) {
+            if (goods.editPackaging) {
+                if (!pattern.test(goods.editPackaging)) {
+                    if (!$scope.enterSaveButton) {
+                        goods.editPackagingInvalid = true;
+                        toaster.pop('warning', '提示', '包装方式只能填写中英文');
+                        return ;
+                    }
+                }
+            }
+            goods.editPackagingInvalid = false;
+        };
+
+        $scope.changePackaging = function (goods) {
+            if (goods.editPackaging) {
+                goods.editPackaging = cutOutString(goods.editPackaging, 10);
+            }
+        };
+
+        $scope.editProduceDateFa = function(commodity) {
+            if($scope.enterSaveButton) {
+                return ;
+            }
+            commodity.editProduceDateInvalid = false;
+            if(commodity.editProduceDate) {
+                commodity.editProduceDate = cutOutString(commodity.editProduceDate, 12);
+                // if(goods.editProduceDate.length > 11) {
+                //     goods.editProduceDateInvalid = true;
+                //     toaster.pop('warning', '提示', '生产日期不能超过十一个字符');
+                // }
+            }
+        }
+
+        /**
+         * 自定义标签的判断逻辑
+         * @param commodity
+         */
+        $scope.editTag = function (commodity) {
+            if (!commodity.editTag) {
+                toaster.pop("warning", "自定义标签不能为空");
+            }
+            if (commodity.editTag) {
+                Goods.getRepeatByTagAndProductId({goodId:commodity.id, productId:commodity.productid, tag:commodity.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 (commodity) {
+            var length = ByteCountService.strByteLength(commodity.editTag);
+            if (length > 20) {
+                commodity.editTag = commodity.editTagPre;
+            } else {
+                commodity.editTagPre = commodity.editTag;
+            }
+        }
+        /**
+         * 增加对应的分段。
+         * @param commodity
+         */
+        $scope.addFragment = function (commodity) {
+            if(commodity.editPrices.length > 2) {
+                toaster.pop('warning', "提示", "批次最多只能有三个分段");
+                return ;
+            }
+            var price = {};
+            price.start = null;
+            price.startPre = null;
+            price.end = commodity.editPrices[commodity.editPrices.length - 1].end;
+            price.endPre = price.end;
+            price.uSDPrice = null;
+            price.uSDPricePre = null;
+            price.rMBPrice = null;
+            price.rMBPricePre = null;
+            commodity.editPrices[commodity.editPrices.length - 1].end = null;
+            commodity.editPrices[commodity.editPrices.length - 1].endPre = null;
+            commodity.editPrices.push(price);
+        }
+
+        /**
+         * 删除对应的分段.
+         * @param commodity
+         */
+        $scope.deleteFragment = function(commodity, index) {
+            if (index > -1 && index < commodity.editPrices.length) {
+                if (commodity.editPrices.length < 2) {
+                    toaster.pop('warning', "提示", "商品至少需要一个分段");
+                    return ;
+                }
+                if (index < commodity.editPrices.length - 1) { //不是最后一个分段
+                    var price = commodity.editPrices.splice(index, 1);
+                    commodity.editPrices[index].start = price[0].start;
+                } else if (index == commodity.editPrices.length - 1) { //如果删除的是最后一个分段,
+                    var price = commodity.editPrices.splice(index, 1);
+                    commodity.editPrices[index -1].end = price[0].end;
+                }
+                if (commodity.editMinBuyQty && $scope.isInt.test(commodity.editMinBuyQty) &&
+                    parseInt(commodity.editPrices[0].end) >= parseInt(commodity.editMinBuyQty)) {
+                    if (commodity.editMinBuyQtyInValid) {
+                        commodity.editMinBuyQtyInValid = false;
+                        commodity.editPrices[0].start = commodity.editMinBuyQty;
+                    }
+                }
+            }
+        };
+
+        /**
+         * 去对应的批次信息
+         */
+        $scope.goToBatchDetail = function (event, commodity) {
+            event.stopPropagation();
+            if(!commodity || !event || commodity.edit) {
+                return ;
+            };
+            var tag = event.target;
+            if(tag) {
+                while((tag != null) && (tag.nodeName != 'BODY')) {
+                    var name = tag.getAttribute('name');
+                    if(name != null &&(name == 'edit-a' || name == 'down-a'
+                        || name == 'img-a' || name == 'kind-a' || name == 'brand-a'
+                        || name == 'cancle-a' || name == 'save-a' || name == 'reduce-a'
+                        || name == 'add-a' || name == 'check-one')) {
+                        return ;
+                    }
+                    tag = tag.parentElement;
+                }
+            };
+            window.open("/store/productDetail/" + commodity.batchCode);
+        };
+
+        /**
+         * 取消修改订单
+         */
+        $scope.cancleEdit = function (commodity) {
+            if(!commodity) {
+                return ;
+            }
+            for(var i = 0; i < $scope.currenctGoods.length; i++) {
+                if($scope.currenctGoods[i].id == commodity.id) {
+                    $scope.currenctGoods.splice(i, 1, $scope.onsale.editGoods);
+                }
+            };
+        };
+
+        /**
+         * 编辑库存信息,
+         * 将需要编辑的信息增加一个备份
+         * @param commodity
+         */
+        $scope.editCommodity = function (commodity, e) {
+            e.stopPropagation();
+            if(commodity == null) {
+                true;
+            }
+            $scope.onsale.editGoods = angular.copy(commodity);
+            angular.forEach($scope.currenctGoods, function (goods) {
+                goods.edit = false;
+            });
+            commodity.edit = true;
+
+            commodity.editPrices = angular.copy(commodity.prices);
+            angular.forEach(commodity.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;
+            });
+
+            commodity.editTagInvalid = false;
+            commodity.editTag = commodity.tag;
+            commodity.editTagPre = commodity.tag;
+            commodity.editTagDirty = false;
+
+            commodity.editPrices[commodity.editPrices.length - 1].end = $scope.maxReserve;
+            commodity.editPrices[commodity.editPrices.length - 1].endPre = $scope.maxReserve;
+            // commodity.editPrices[0].start = $scope.minReserve;
+            // commodity.editPrices[0].startPre = $scope.minReserve;
+
+            commodity.editReserve = commodity.reserve;
+            commodity.editReservePre = commodity.reserve;
+            commodity.editReserveDirty = false;
+            commodity.editReserveInvalid = false;
+
+            commodity.editMinBuyQty = commodity.minBuyQty;
+            commodity.editMinBuyQtyPre = commodity.minBuyQty;
+            commodity.editMinBuyQtyDirty = false;
+            commodity.editMinBuyQtyInValid = false;
+
+            commodity.editMinPackQty = commodity.minPackQty;
+            commodity.editMinPackQtyPre = commodity.minPackQty;
+            commodity.editMinPackQtyDirty = false;
+            commodity.editMinPackQtyInValid = false;
+            commodity.editspec = commodity.spec;
+
+            commodity.editBreakUp = commodity.breakUp;
+            commodity.editBreakUpPre = commodity.breakUp;
+            commodity.editBreakUpDirty = false;
+
+            commodity.editPackaging = commodity.packaging;
+            commodity.editPackagingPre = commodity.packaging;
+            commodity.editPackagingDirty = false;
+            commodity.editPackagingInvalid = false;
+
+            commodity.editProduceDate = new String(commodity.produceDate || '');
+            commodity.editProduceDatePre = commodity.produceDate;
+            commodity.editProduceDateDirty = false;
+            commodity.editProduceDateInvalid = false;
+
+            commodity.editSelfDeliveryHKMinTime = commodity.selfDeliveryHKMinTime;
+            commodity.editSelfDeliveryHKMinTimePre = commodity.selfDeliveryHKMinTime;
+            commodity.editSelfDeliveryHKMinTimeDirty = false;
+
+            commodity.editSelfDeliveryHKMaxTime = commodity.selfDeliveryHKMaxTime;
+            commodity.editSelfDeliveryHKMaxTimePre = commodity.selfDeliveryHKMaxTime;
+            commodity.editSelfDeliveryHKMaxTimeDirty = false;
+
+            commodity.editSelfDeliveryDemMinTime = commodity.selfDeliveryDemMinTime;
+            commodity.editSelfDeliveryDemMinTimePre = commodity.selfDeliveryDemMinTime;
+            commodity.editSelfDeliveryDemMinTimeDirty = false;
+
+            commodity.editSelfDeliveryDemMaxTime = commodity.selfDeliveryDemMaxTime;
+            commodity.editSelfDeliveryDemMaxTimePre = commodity.selfDeliveryDemMaxTime;
+            commodity.editSelfDeliveryDemMaxTimeDirty = false;
+
+            commodity.editMinDelivery = commodity.minDelivery;
+            commodity.editMinDeliveryPre = commodity.minDelivery;
+            commodity.editMinDeliveryDirty = false;
+            commodity.editMinDeliveryinValid = false;
+
+            commodity.editMaxDelivery = commodity.maxDelivery;
+            commodity.editMaxDeliveryPre = commodity.maxDelivery;
+            commodity.editMaxDeliveryDirty = false;
+            commodity.editMaxDeliveryinValid = false;
+            commodity.editPic = commodity.img;
+
+            commodity.editSelfSale = $scope.storeInfo.uuid != 'undefind' && commodity.storeid == $scope.storeInfo.uuid && $scope.storeInfo.storeName.indexOf('优软测试二') < 0 && $scope.storeInfo.storeName.indexOf('优软商城') < 0 ? 1 : 2;
+        };
+
+        /**
+         * 是否可拆卖
+         * @param commodity
+         */
+        $scope.toggleIsBreadUp = function (commodity) {
+            commodity.editBreakUp = !commodity.editBreakUp;
+            if(!commodity.editBreakUp) {
+                $scope.isNotBreakUp(commodity);
+            }
+        };
+
+        /**
+         * 修改commodity的系列的dirty属性 为true;
+         * @param commodity
+         */
+        $scope.initDirtyTrue = function(commodity) {
+            angular.forEach(commodity.editPrices, function (price) {
+                price.startDirty = false;
+                price.endDirty = false;
+                price.rMBPriceDirty = false;
+                price.uSDPriceDirty = false;
+            });
+            commodity.editReserveDirty = false;
+            commodity.editMinBuyQtyDirty = false;
+            commodity.editMinPackQtyDirty = false;
+            commodity.editPackagingDirty = false;
+            commodity.editProduceDateDirty = false;
+            commodity.editSelfDeliveryHKMinTimeDirty = false;
+            commodity.editSelfDeliveryHKMaxTimeDirty = false;
+            commodity.editSelfDeliveryDemMinTimeDirty = false;
+            commodity.editSelfDeliveryDemMaxTimeDirty = false;
+        };
+
+        /**
+         * 修改分段的数量
+         * @param commodity 批次信息
+         * @param index 索引值
+         * @param isEnd 是否是结束值
+         */
+        $scope.editQty = function (commodity, index, isEnd, num) {
+            commodity.editPrices[index].endInValid = false;
+            commodity.editPrices[index].startInValid = false;
+            if(commodity.editPrices.length < index || index < 0) {
+                return ;
+            }
+            if(!num) {
+                return ;
+            }
+            if (!$scope.isInt.test(num)) {
+                if(!$scope.enterSaveButton) {
+                    if (isEnd) {
+                        delete commodity.editPrices[index].end;
+                        //commodity.editPrices[index].end = commodity.editPrices[index].endPre;
+                    } else {
+                        delete commodity.editPrices[index].start;
+                        //commodity.editPrices[index].start = commodity.editPrices[index].startPre;
+                    }
+                    toaster.pop('warning', '提示', '分段数量必须为正整数');
+                }
+                return ;
+            }
+            if (isEnd) {
+                if (index < commodity.editPrices.length - 1) {
+                    if (parseInt(commodity.editPrices[index].end) < parseInt(commodity.editPrices[index].start)) {
+                        if(!$scope.enterSaveButton) {
+                            toaster.pop('warning', '提示', '输入值必须大于' +  commodity.editPrices[index].start);
+                            delete commodity.editPrices[index].end;
+                        }
+                        //commodity.editPrices[index].end = commodity.editPrices[index].endPre;
+                    } else if ((commodity.editPrices[index + 1].end) && (parseInt(commodity.editPrices[index].end) + 1) >= parseInt(commodity.editPrices[index + 1].end)) {
+                        if(!$scope.enterSaveButton) {
+                            toaster.pop('warning', '提示', '输入的值必须小于'+(parseInt(commodity.editPrices[index].end) - 1));
+                            delete commodity.editPrices[index].end;
+                        }
+                        //commodity.editPrices[index].end = commodity.editPrices[index].endPre;
+                    } else {
+                        commodity.editPrices[index + 1].start = parseInt(commodity.editPrices[index].end) + 1;
+                        commodity.editPrices[index].endPre = commodity.editPrices[index].end;
+                        commodity.editPrices[index + 1].startPre = commodity.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(commodity.editPrices[index].start) > parseInt(commodity.editPrices[index].end)) {
+                        // toaster.pop('warning', '提示', '修改本分段之后,会导致分段的起始值' + commodity.editPrices[index ].start + '大于结束值' + parseInt(commodity.editPrices[index].end));
+                        //commodity.editPrices[index].start = commodity.editPrices[index].startPre;
+                        if(!$scope.enterSaveButton) {
+                            toaster.pop('warning', '提示', '输入值必须小于'+ + commodity.editPrices[index].end);
+                            delete commodity.editPrices[index].start;
+                        }
+                    } else if ((parseInt(commodity.editPrices[index].start) - 1) < commodity.editPrices[index - 1].start) {
+                        // toaster.pop('warning', '提示', '修改本分段之后,会导致前一个分段的起始值' + commodity.editPrices[index - 1].start + '大于结束值' + (parseInt(commodity.editPrices[index].start) - 1));
+                        // commodity.editPrices[index].start = commodity.editPrices[index].startPre;
+                        if(!$scope.enterSaveButton) {
+                            toaster.pop('warning', '提示', '输入值会导致梯度重叠,请重新修改');
+                            delete commodity.editPrices[index].start;
+                        }
+                    } else {
+                        commodity.editPrices[index - 1].end = parseInt(commodity.editPrices[index].start) - 1;
+                        commodity.editPrices[index].startPre = commodity.editPrices[index].start;
+                        commodity.editPrices[index - 1].endPre = commodity.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 需要验证的批次的信息
+         * @returns {boolean}
+         */
+        var changeQtyPrice = function(commodity) {
+            var price = commodity.editPrices;
+            var previousEnd = -1;
+            for(var i = 0; i < price.length; i++){
+                price[i].startInValid = false;
+                price[i].endInValid = false;
+                if(isNaN(price[i].start)) {
+                    price[i].startInValid = true;
+                    toaster.pop('warning', "提示", "分段数量必须是数字");
+                    return false;
+                }
+                if(parseInt(price[i].start) <= previousEnd) {
+                    price[i].startInValid = true;
+                    toaster.pop('warning', "提示", "存在上一个分段的结束值大于下一个分段的起始值");
+                    return false;
+                }
+                if(isNaN(price[i].end)) {
+                    price[i].endInValid = true;
+                    toaster.pop('warning', "提示", "分段数量必须是数字");
+                    return false;
+                }
+                if(parseInt(price[i].start) > parseInt(price[i].end)) {
+                    price[i].startInValid = true;
+                    toaster.pop('warning', "提示", "存在分段的起始值大于分段的结束值");
+                    return false;
+                }
+                previousEnd = price[i].end;
+            }
+            return true;
+        };
+
+        /**
+         * commodity,
+         * 验证库存量是否大于原有的库存量
+         */
+        $scope.changeReserve = function (commodity) {
+            commodity.editReserveInvalid = true;
+            if (typeof commodity.editReserve == 'undefined') {
+                return;
+            }
+            if (!commodity.editReserve) {
+                //commodity.editReserve = commodity.editReservePre;
+                if (!$scope.enterSaveButton) {
+                    commodity.editReserveInvalid = true;
+                    toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                }
+                return false;
+            }
+            if (!$scope.isInt.test(commodity.editReserve)) {
+                //commodity.editReserve = commodity.editReservePre;
+                if (!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                    commodity.editReserveInvalid = true;
+                }
+                return false;
+            }
+            // if (parseInt(commodity.editReserve) < parseInt(commodity.editMinBuyQty)) {
+            //     //commodity.editReserve = commodity.editReservePre;
+            //     commodity.editReserveInvalid = true;
+            //     toaster.pop('warning', '提示', '库存必须是大于等于起订量的整数');
+            //     return false;
+            // }
+            if (parseInt(commodity.editReserve) > $scope.maxReserve || commodity.editReserve < $scope.minReserve) {
+                //commodity.editReserve = commodity.editReservePre;
+                if (!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '库存须填写小于10亿的正整数');
+                    commodity.editReserveInvalid = true;
+                }
+                return false;
+            }
+            commodity.editReservePre = commodity.editReserve;
+            commodity.editReserveInvalid = false;
+            if (!commodity.breakUp) {
+                $scope.isNotBreakUp(commodity);
+            }
+            return true;
+
+        }
+
+        var initRuleCount = function () {
+            return DistributionRule.findCountOfActiveRule({},{},function (data) {
+                if (data.success){
+                    $scope.needShowTip = data.data;
+                }
+            }, function (error) {
+                toaster.pop("error", error.data);
+            })
+        };
+        initRuleCount();
+
+        $q.all([initRuleCount().$promise]).then(function (data) {
+            if (data){
+                if ($scope.needShowTip){
+                    $modal.open({
+                        animation: true,
+                        templateUrl: 'static/view/common/modal/delivery_rule_modal.html',
+                        controller: 'rule_tip_ctrl',
+                        resolve : {
+                            type : function() {
+                                return 'product';
+                            },
+                            tipModal : function() {
+                                return true;
+                            },
+                            success : function () {
+                                return false;
+                            },
+                            uuid: function () {
+                                return null;
+                            }
+                        }
+                    });
+                }
+            }
+        });
+
+        /**
+         *
+         * @param commodity
+         * 验证库存的最小起订量是否大于库存量
+         */
+        $scope.changeMinBuyQty = function (commodity) {
+            // commodity.editMinBuyQtyInValid = false;
+            // if (typeof commodity.editMinBuyQty == 'undefined') {
+            //     commodity.editMinBuyQtyInValid = true;
+            //     return false;
+            // }
+            if (!$scope.isInt.test(commodity.editMinBuyQty) || parseInt(commodity.editMinBuyQty) < 1) {
+                // goods.editMinBuyQtyInValid = true;
+                if (commodity.editBreakUp) {
+                    commodity.editMinBuyQty = 1;
+                    commodity.editPrices[0].start = commodity.editMinBuyQty;
+                } else {
+                    if (commodity.editMinPackQty) {
+                        commodity.editMinBuyQty = commodity.editMinPackQty;
+                        commodity.editPrices[0].start = commodity.editMinBuyQty;
+                    }
+                }
+                if (!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '起订量必须是大于0的整数');
+                    return false;
+                }
+                return false;
+            }
+            commodity.editMinBuyQtyPre = commodity.editMinBuyQty;
+            if (!commodity.editBreakUp) {
+                $scope.isNotBreakUp(commodity);
+            }
+        };
+
+        $scope.updateStartNumber = function (commodity) {
+            commodity.editPrices[0].start = commodity.editMinBuyQty;
+        };
+
+        /**
+         * 修改批次信息的包装个数
+         * @param commodity
+         */
+        $scope.changeMinPackQty = function(commodity) {
+            if(typeof commodity.editMinPackQty == 'undefined') {
+                return;
+            }
+            if(!$scope.isInt.test(commodity.editMinPackQty)) {
+                if(!$scope.enterSaveButton) {
+                    commodity.editMinPackQtyInValid = true;
+                    toaster.pop('warning', '提示', '包装数必须是大于0的整数');
+                }
+                return false;
+            }
+            if(commodity.editMinPackQty < 1) {
+                if(!$scope.enterSaveButton) {
+                    commodity.editMinPackQtyInValid = true;
+                    toaster.pop('warning', '提示', '包装数必须是大于0的整数');
+                }
+                return false;
+            }
+            // if(commodity.editMinPackQty > commodity.editReserve) {
+            //     toaster.pop('warning', '提示', '包装数必须小于等于库存量。');
+            //     return false;
+            // }
+            if(parseInt(commodity.editMinPackQty) > $scope.maxPackQty) {
+                if(!$scope.enterSaveButton) {
+                    commodity.editMinPackQtyInValid = true;
+                    toaster.pop('warning', '提示', '包装数量必须小于等于' + $scope.maxPackQty);
+                }
+                return false;
+            }
+            if(commodity.editMinBuyQty) {
+                if(!commodity.editBreakUp) {
+                    $scope.isNotBreakUp(commodity);
+                }
+            }
+            commodity.editMinPackQtyPre = commodity.editMinPackQty;
+            commodity.editMinPackQtyInValid = false;
+        }
+
+        /**
+         * 比较交货周期的大小
+         * @param min 本来是最小值
+         * @param max 本来是最大值
+         * @param type 2 表示当前验证的香港交期, 1表示当前验证的是大陆交期
+         * @param commodity 批次信息
+         * @returns {boolean} true 表示验证通过,false 表示验证失败。
+         */
+        $scope.compareNum = function(min, max, type, commodity) {
+            if(!min) {
+                commodity.editMinDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期存在空值,请重新操作');
+                return false;
+            }else if(!max) {
+                commodity.editMaxDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期存在空值,请重新操作');
+                return false;
+            }
+            if(!$scope.isInt.test(min)) {
+                commodity.editMinDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
+                return false;
+            }
+            if(!$scope.isInt.test(max)) {
+                commodity.editMaxDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
+                return false;
+            }
+            if(min < 1 || min > 999) {
+                commodity.editMinDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期只能填写1-999之间的值');
+                return false;
+            }
+            if(max < 1 || max > 999) {
+                commodity.editMaxDeliveryinValid = true;
+                toaster.pop('warning', '提示', '交期的时间必须是1-999之内');
+                return false;
+            }
+            if(Number(min) > Number(max)) {
+                commodity.editMaxDeliveryinValid = true;
+                commodity.editMinDeliveryinValid = true;
+                toaster.pop('warning', '提示', '最短交期应小于等于最长交期');
+                return false;
+            }
+            return true;
+        }
+
+        /**
+         * @param min 最小值
+         * @param max 最大值
+         * @param isMin 传入的是否是最小值
+         * @param isHk 是否是香港交货周期
+         * @param commodity 批次信息
+         */
+        $scope.changeDelivery = function(min, max, isMin, isHk, commodity) {
+            if(isMin) {
+                commodity.editMinDeliveryinValid = false;
+            }else {
+                commodity.editMaxDeliveryinValid = false;
+            }
+            var day = -1;
+            if(isMin) {
+                if(min && $scope.isInt.test(min)) {
+                    day = min;
+                }else {
+                    if(!min) {
+                        return ;
+                    }
+                    if(!$scope.isInt.test(min)) {
+                        if(!$scope.enterSaveButton) {
+                            commodity.editMinDeliveryinValid = true;
+                            toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
+                        }
+                    }
+                    return ;
+                }
+            }else {
+                if(max && $scope.isInt.test(max)) {
+                    day = max;
+                }else {
+                    if(!max) {
+                        return ;
+                    }
+                    if(!$scope.isInt.test(max)) {
+                        if (!$scope.enterSaveButton) {
+                            commodity.editMaxDeliveryinValid = true;
+                            toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
+                        }
+                    }
+                    return ;
+                }
+
+            }
+            if(day > 999 || day < 1) {
+                if(!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '交期只能填写1-999之间的整数值');
+                    if(isMin) {
+                        commodity.editMinDeliveryinValid = true;
+                    }else {
+                        commodity.editMaxDeliveryinValid = true;
+                    }
+                }
+                return ;
+            }
+            if(Number(min) > Number(max)) {
+                if(!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '最短交期应小于等于最长交期');
+                    commodity.editMinDeliveryinValid = true;
+                    commodity.editMaxDeliveryinValid = true;
+                }
+                return ;
+            }
+
+            commodity.editMinDeliveryinValid = false;
+            commodity.editMaxDeliveryinValid = false;
+        }
+
+        /**
+         * 鼠标移入到保存按钮
+         */
+        $scope.impedeBlur = function () {
+            $scope.enterSaveButton = true;
+        }
+
+        /**
+         * 鼠标移出保存按钮
+         */
+        $scope.recoveryBlur = function () {
+            $scope.enterSaveButton = false;
+        }
+
+        /**
+         * 判断价格是否合理,只设置验证的结果
+         * @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)) {
+                if (!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '单价必须是大于0的数字');
+                    prices[index].priceInvalid = true;
+                    return;
+                }
+            }
+            if(new Number(price) <= 0) {
+                if (!$scope.enterSaveButton) {
+                    toaster.pop('warning', '提示', '单价必须是大于0的数字');
+                    prices[index].priceInvalid = true;
+                }
+                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 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 > 12) {
+                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 commodity
+         */
+        $scope.updateGoods = function(commodity, index){
+            //验证库存信息
+            if(!$scope.checkGoodsInfo(commodity)) {
+                return ;
+            }
+            //更新分段信息
+            if(!changeQtyPrice(commodity)) {
+                return ;
+            };
+
+
+
+            //将修改的信息映射到对应的字段
+            inserseCommodity(commodity);
+            Goods.updateGoods(null, commodity, function(data){
+                if(data.code == 1) {
+                    toaster.pop('success', '修改成功');
+                    loadData()
+                    // $scope.currenctGoods.splice(index, 1, data.data);
+                }else {
+                    toaster.pop('error', '失败', data.message);
+                }
+            }, function(response){
+                toaster.pop('error', '失败', response.data);
+            });
+        };
+
+        var inserseCommodity = function (commodity) {
+            commodity.packaging = commodity.editPackaging;
+            commodity.produceDate = commodity.editProduceDate;
+            commodity.oldReserve =  commodity.reserve;
+            commodity.reserve =  commodity.editReserve;
+            commodity.minBuyQty = commodity.editMinBuyQty;
+            commodity.prices = commodity.editPrices;
+            commodity.selfDeliveryHKMinTime = commodity.editSelfDeliveryHKMinTime;
+            commodity.selfDeliveryHKMaxTime = commodity.editSelfDeliveryHKMaxTime;
+            commodity.selfDeliveryDemMinTime = commodity.editSelfDeliveryDemMinTime;
+            commodity.selfDeliveryDemMaxTime = commodity.editSelfDeliveryDemMaxTime;
+            commodity.minDelivery = commodity.editMinDelivery;
+            commodity.maxDelivery = commodity.editMaxDelivery;
+            commodity.selfSale = commodity.editSelfSale;
+            commodity.minPackQty = commodity.editMinPackQty;
+            commodity.img = commodity.editPic;
+            commodity.breakUp = typeof commodity.editBreakUp == 'undefined' ? false : commodity.editBreakUp;
+            commodity.tag = commodity.editTag;
+        };
+
+        /**
+         * 修改批次信息的图片
+         */
+        $scope.editGoodsPicture = function(pic, commodity) {
+            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) {
+                    commodity.editPic = editPic;
+                }
+            }, function() {
+
+            });
+        }
+
+        /**
+        * 修改规格书
+        */
+        $scope.editRegulPicture = function(Regulpic, commodity) {
+          var modalInstance = $modal.open({
+            templateUrl : 'static/view/vendor/modal/edit_regul_modal.html',
+            size : 'md',
+            controller : 'editRegulationCtrl',
+            resolve : {
+              Regulpic : function() {
+                return Regulpic;
+              },
+              showAction: function() {
+                return false
+              },
+              ChooseItem: function() {
+                commodity.standard = !commodity.uuid ? 0 : 1
+                commodity.pbranden = commodity.brandNameEn
+                commodity.kind = commodity.kindNameCn
+                commodity.pcmpcode = commodity.code
+                return commodity
+              }
+            }
+          });
+          modalInstance.result.then(function (Regulpic) {
+            if(Regulpic) {
+              commodity.attach = Regulpic.url;
+            }
+          }, function() {
+
+          });
+        }
+
+      /**
+         * 切换销售模式
+         */
+        $scope.changeSaleMode = function (commodity) {
+            StoreCms.validCommdityisAdvantageCommodity({batchcode : commodity.batchCode}, function (data) {
+                if(data.code != 1) {
+                    toaster.pop('warning', '提示', data.message);
+                }
+            }, function (response) {
+            });
+
+        };
+
+        /*******************************编辑库存信息 end****************************************/
+
+        /**
+         * 获取当前需要下载的在售产品信息的ID
+         */
+        var getDownLoadGoodsId = function() {
+            var goodsID = [];
+            angular.forEach($scope.currenctGoods, function (good) {
+                goodsID.push(good.id);
+            });
+            return goodsID;
+        };
+
+        function downloadByJs(url, keyword, type) {
+            $http({
+                method: 'get',
+                dataType: 'json',
+                url: url,
+                params: {
+                    keyword: keyword,
+                    isSelfSupport: type
+                }
+            }).success(function (data) {
+                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', 'isSelfSupport');
+                input1.attr('value', type);
+
+                $('body').append(form);  //将表单放置在web中
+                form.append(input1);   //将查询参数控件提交到表单上
+                form.append(input2);
+                form.submit();
+            }).error(function (response) {
+                toaster.pop('error', response);
+            });
+        }
+
+        function downloadSelectedByJs(url, idList) {
+            $http({
+                method: 'get',
+                dataType: 'json',
+                url: url,
+                params: {
+                    ids: idList
+                }
+            }).success(function (data) {
+                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', 'ids');
+                input1.attr('value', idList);
+
+                $('body').append(form);  //将表单放置在web中
+                form.append(input1);   //将查询参数控件提交到表单上
+                form.submit();
+            }).error(function (response) {
+                toaster.pop('error', response);
+            });
+        }
+
+        // 下载模板
+        $scope.download = function() {
+            if ($scope.currenctGoods && $scope.currenctGoods.length == 0) {
+                toaster.pop('info', '当前产品列表为空,无法下载');
+                return;
+            }
+            if ($scope.chooseAllPage) {
+                if ($scope.selfSupport === $scope.selfSupportType.SELF_SUPPORT) {
+                    $scope.param.isSelfSupport = true;
+                } else if ($scope.selfSupport === $scope.selfSupportType.CONSIGNMENT) {
+                    $scope.param.isSelfSupport = false;
+                } else {
+                    $scope.param.isSelfSupport = null;
+                }
+                downloadByJs('trade/goods/down/goods', $scope.param.keyword, $scope.param.isSelfSupport);
+            } else {
+                getChooseInfo();
+                if (!$scope.choosedIds || $scope.choosedIds.length == 0) {
+                    toaster.pop("info", "您尚未选中任何产品");
+                    return ;
+                }
+                var idStr = $scope.choosedIds.join('-');
+                downloadSelectedByJs('trade/goods/down/ids', idStr);
+            }
+        };
+
+        /**
+         * 下载当前页的订单信息
+         */
+        $scope.localInfo = {};
+        $scope.downGoods = function () {
+            var listId = getDownLoadGoodsId();
+            if(listId.length < 1) {
+                toaster.pop('warning', '提示', '当前需要下载的订单条数为0');
+                return ;
+            }
+            Loading.show();
+            $scope.localInfo.ids = listId.join("-");
+            $scope.$apply();
+            var form = document.getElementById('down-load-goods');
+            form.action = 'trade/goods/down/ids';
+            form.submit();
+            var clockID = null;
+            var getDownLoadStatus = function () {
+                $.ajax({
+                    url : 'trade/goods/down/ids',
+                    data : {isAjax : true, ids : $scope.localInfo.ids},
+                    method : 'GET',
+                    dataType : 'json',
+                    success : function (data) {
+                        if(data.loading) {
+                            clockID = setInterval(function() {
+                                getDownLoadStatus()
+                            }, 500);
+                        }else {
+                            $scope.$apply(function () {
+                                toaster.pop('info', '数据处理完毕,正在下载文件,请稍等。');
+                                Loading.hide();
+                            });
+                            if(!clockID) {
+                                clearInterval(clockID);
+                            }
+                        }
+                    },
+                    error : function () {
+                        Loading.hide();
+                        if(!clockID) {
+                            clearInterval(clockID);
+                        }
+                    }
+                });
+            };
+            getDownLoadStatus();
+        };
+
+        // 点击下架操作
+        $scope.soldOut = function (commodity) {
+            $scope.isSoldOut = true;
+            $scope.soldOutCommodity = commodity;
+        };
+
+        // 取消删除的操作
+        $scope.cancleSoldOut = function (event) {
+            if (event) {
+                event.stopPropagation();
+            }
+            $scope.isSoldOut = false;
+            $scope.soldOutCommodity = null;
+        };
+
+        // 点击下架操作
+        $scope.soldOut = function (event, commodity) {
+            if (event) {
+                event.stopPropagation();
+            }
+            $scope.isSoldOut = true;
+            $scope.soldOutCommodity = commodity;
+        };
+
+        var loadDataReload = function () {
+            $scope.param = {
+                page : 1,
+                count : 10,
+                sorting : {
+                    createdDate: 'DESC'
+                },
+                status : "601-602"
+            };
+            loadData();
+        };
+
+        loadData();
+
+        /**
+         * 筛选商品类型
+         *
+         * @param type		商品上架类型
+         */
+        $scope.selfSupport = '销售方式';
+        $scope.changeSupportType = function (type) {
+            if (!type) return ;
+            $scope.selfSupport = type;
+            loadDataReload();
+        };
+
+        /**
+         * 如果不拆分需要重新计算最小起订量的信息
+         * @param goods
+         */
+        $scope.isNotBreakUp = function (commodity) {
+            if (commodity.editMinPackQty&&commodity.editMinBuyQty) {
+                var remainder = commodity.editMinBuyQty % commodity.editMinPackQty;
+                if (remainder != 0) {
+                    toaster.pop('warning', '提示', '不可拆卖时,起订量必须是包装数量的倍数');
+                    if (parseInt(commodity.editMinBuyQty) > parseInt(commodity.editMinPackQty)) {
+                        commodity.editMinBuyQty = Number(NumberService.sub(commodity.editMinBuyQty, remainder));
+                    } else {
+                        commodity.editMinBuyQty = commodity.editMinPackQty;
+                    }
+                    commodity.editPrices[0].start = commodity.editMinBuyQty;
+                }
+            }
+        }
+
+        $scope.batchModify = false;
+        $scope.modifyResult = false;
+        $scope.modifyBatch = function () {
+            $scope.batchModify = true;
+        };
+
+        $scope.importExcel = function () {
+            if(($scope.myFile == null) || ($scope.myFile.length == 0)) {
+                return ;
+            }
+            var file = $scope.myFile[0];
+            if (!file) {
+                toaster.pop('info', '请选择需要上传的文件');
+                return;
+            }
+            $upload.upload({
+                url: 'release/product/modify/excel',
+                file: file,
+                method: 'POST'
+            }).success(function(data) {
+                $scope.selectFile(' ');
+                $scope.myFile = [];
+                $scope.modifyData = data;
+                $scope.batchModify = false;
+                $scope.modifyResult = true;
+                if ($scope.modifyData.success > 0) {
+                    loadData();
+                }
+            }).error(function(response) {
+                $scope.selectFile(' ');
+                $scope.myFile = [];
+                toaster.pop('error', response.data || response);
+            });
+        };
+
+        //选择文件
+        $scope.selectFile = function(value) {
+            if(value != null) {
+                upload_text.value = value;
+            }else {
+                var fileInput = angular.element('#uploadCommodity')[0];
+                upload_text.value = fileInput.value;
+            }
+        };
+
+        // 下载未修改成功的数据
+        $scope.downloadExcel = function(){
+            var param = {isAjax : true, batch : $scope.modifyData.batch};
+            if ($scope.modifyData && $scope.modifyData.batch && ($scope.modifyData.fail || $scope.modifyData.filter)) {
+                var form = document.getElementById('load-error');
+                form.action= 'release/product/modify/failure';
+                form.submit();
+                Loading.show();
+                var intervalId = null;
+                var getDownLoadStatus = function () {
+                    $.ajax({
+                        type: 'GET',
+                        url: 'release/product/modify/failure',
+                        data : param,
+                        dataType : 'json',
+                        success: function (data) {
+                            if (!data.load) {
+                                $scope.$apply(function () {
+                                    Loading.hide();
+                                    /*toaster.pop('success', '数据处理完毕,正在下载文件,请稍等。');*/
+                                });
+                                clearInterval(intervalId);
+                            }
+                        },
+                        error: function () {
+                            Loading.hide();
+                            clearInterval(intervalId);
+                        }
+                    });
+                };
+                intervalId= setInterval(function () {
+                    getDownLoadStatus();
+                }, 500);
+            } else {
+                if (!$scope.modifyData.fail && !$scope.modifyData.filter) {
+                    toaster.pop('info', '提示', '您没有修改不成功的数据');
+                }
+            }
+        };
+      $scope.onCodeChange = function(code) {
+        if ((/[^\x00-\xff]/g).test(code)) {
+          var chineseIndex = -1;
+          for (var i = 0; i < code.length; i++) {
+            if ((/[^\x00-\xff]/g).test(code.charAt(i))) {
+              chineseIndex = i;
+              break;
+            }
+          }
+          $scope.commodity.kindNameCn = cutOutString(code, chineseIndex);
+        } else if (code && getRealLen(code) > 100) {
+          $scope.commodity.kindNameCn = cutOutString(code, 100);
+        }
+      }
+      $scope.onBrandChange = function(brand) {
+        if (brand && getRealLen(brand) > 50) {
+          $scope.commodity.brandNameEn = cutOutString(brand, 50);
+        } else if ((/[^\x00-\xff]/g).test(brand)) {
+          var chineseIndex = -1;
+          for (var i = 0; i < brand.length; i++) {
+            if ((/[^\x00-\xff]/g).test(brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(brand.charAt(i))) {
+              chineseIndex = i;
+              break;
+            }
+          }
+          if (chineseIndex > -1) {
+            $scope.commodity.brandNameEn = brand.substring(0, chineseIndex);
+          }
+        }
+      }
+
+      var getRealLen = function(str) {
+        var len = 0;
+        for (var i = 0; i < str.length; i++) {
+          if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
+            len += 2;
+          } else {
+            len++;
+          }
+        }
+        return len;
+      }
+    }]);
+
+    // 上传批次图片
+    app.register.controller('editPictureCtrl', ['$scope', 'pic', '$modalInstance', function ($scope, pic, $modalInstance) {
+        $scope.pic = pic;
+        $scope.cancel = function () {
+            $modalInstance.close();
+        };
+
+        // 图片上传成功之后
+        $scope.onUploadSuccess = function(data){
+            $scope.pic = data.path;
+        };
+
+        $scope.confirm = function() {
+            $modalInstance.close($scope.pic);
+        }
+    }]);
+
+});

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

@@ -1014,8 +1014,8 @@
 		<div class="com_tab" style="margin-bottom: 10px">
 			<ul class="fl" style="width: 100%">
 				<li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material">产品库</a></li>
-				<li><a>出入库</a></li>
-				<li><a ui-sref="vendor_undercarriage">上下架记录</a></li>
+				<li ng-class="{'active': tab == 'storage'}"><a ui-sref="vendor_storage">出入库</a></li>
+				<li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架记录</a></li>
 			</ul>
 		</div>
 		<div class="com_tab com_tab2" ng-if="!isPcbStore" style="margin-bottom: 0px">

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

@@ -1815,6 +1815,7 @@
 				<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 == 'onSale'}"><a ui-sref="vendor_onSale">在售产品</a></li>
+				<li ng-class="{'active': tab == 'storage'}"><a ui-sref="vendor_storage">出入库</a></li>
 				<li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架历史</a></li>
 				<li ng-if="isPcbStore"><a ui-sref="vendor_upload">产品导入</a></li>
 			</ul>

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

@@ -1013,6 +1013,7 @@
                 <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 == 'onSale'}"><a ui-sref="vendor_onSale">在售产品</a></li>
+                <li ng-class="{'active': tab == 'storage'}"><a ui-sref="vendor_storage">出入库</a></li>
                 <li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架历史</a></li>
                 <li ng-if="isPcbStore"><a ui-sref="vendor_upload">产品导入</a></li>
                 <li class="down-goods">

+ 2012 - 0
src/main/webapp/resources/view/vendor/forstore/vendor_storage.html

@@ -0,0 +1,2012 @@
+<!--右侧主体部分-->
+<style>
+    *{-webkit-box-sizing: border-box;  -moz-box-sizing: border-box;  box-sizing: border-box;}
+    label[disabled] {
+        cursor: not-allowed;
+    }
+
+    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;
+    }
+    .filter:hover .hover-show {
+        display: inline-block;
+        z-index: 1000;
+    }
+    .filter:hover .angle-hover-up {
+        -webkit-transform: rotateZ(180deg);
+        -moz-transform: rotateZ(180deg);
+        -o-transform: rotateZ(180deg);
+        -ms-transform: rotateZ(180deg);
+        transform: rotateZ(180deg);
+    }
+    .filter .hover-show{
+        width: 100%;
+        height: auto;
+        position: absolute;
+        background-color: #fff;
+        margin-top: -1px;
+        border: 1px solid #e8e8e8;
+        border-top: none;
+        display: none;
+        left: 0;
+        top: 100%;
+    }
+    .filter .hover-show a{
+        width: 100%;
+        height: 40px;
+        display: inline-block;
+        line-height: 40px;
+        text-align: center;
+        font-size: 14px;
+        font-weight: normal;
+    }
+    .filter .hover-show a:hover{
+        background: #ecf2fd;
+        color: #5078cb !important;
+    }
+    .wid02 .fr .hidden-ellipsis-110 {
+        width: 110px;
+        overflow: hidden;
+        word-break: normal;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+    }
+    .com-out-box{
+        position: fixed;
+        z-index: 2;
+        height: 152px;
+        opacity: 1;
+        background-color: white;
+        width: 310px;
+        -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
+        box-shadow: 0 5px 15px rgba(0,0,0,.5);
+        margin: -155px 0 0 -75px;
+        top: 55%;
+        left: 50%;
+    }
+    .com-out-box .title{
+        height: 30px;
+        background-color: #5078cb;
+        text-align: right;
+        padding-right: 15px;
+        line-height: 30px;
+    }
+    .com-out-box .title a{
+        color: white;
+        font-size: 16px;
+    }
+    .pay_record .ticket_record_list dl dd{
+        position: relative;
+    }
+    .com-out-box .content{
+        width: 100%;
+        text-align: center;
+        margin: 0 auto;
+    }
+    .com-out-box .content p{
+        line-height: 50px;
+        font-size: 14px;
+        padding-top: 10px;
+    }
+    .com-out-box .content p i{
+        color: #5078cb;
+        font-size: 16px;
+        margin-right: 10px;
+    }
+    .com-out-box .content div{
+        width: 100%;
+        text-align: center;
+        margin: 0 auto;
+    }
+    .com-out-box .content div.red {
+        position: relative;
+        top: -10px;
+    }
+    .com-out-box .content div a{
+        width: 55px;
+        height: 26px;
+        line-height: 26px;
+        display: inline-block;
+        text-align: center;
+        font-size: 14px;
+    }
+    .com-out-box .content div a:first-child{
+        background: #b4b5b9;
+        color: #333;
+        margin-right: 10px;
+    }
+    .com-out-box .content div a:last-child{
+        background: #5078cb;
+        color: #fff;
+    }
+    .com-out-box .content div a:hover{
+        background: #3f7ae3;
+        color: #fff;
+    }
+
+    .check-input{
+        position: relative;
+        padding-left: 15px;
+    }
+    .check-input .check-show{
+        position: absolute;
+        top: 21px;
+        height: 15px;
+        line-height: 15px;
+        left: 18px;
+    }
+    .check-input input{
+        display: none;
+    }
+    .check-input > span {
+        padding-left: 10px;
+    }
+    .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;
+    }
+    .pro_management .product_off dd:last-of-type{
+        border-bottom: #cfcfcf 1px solid;
+    }
+    .record-line{
+        /*height: 30px;*/
+        font-size: 12px;
+        line-height: 35px;
+        /* margin-top: 5px; */
+        padding-right: 22px
+    }
+    .wanted_list .pagination{
+        margin: 0;
+    }
+    .ng-table-pager{
+        padding-bottom: 20px;
+    }
+
+    /*编辑*/
+    .vendor-tab .img{
+        width: 60px;
+        height: 60px;
+        border: #e8e8e8 1px solid;
+        overflow: hidden;
+        line-height: 60px;
+        margin-top: 0;
+        border-radius: 3px;
+    }
+    .vendor-tab .img img{
+        width: 60px;
+        height: 60px;
+    }
+    .vendor-tab .img a{
+        margin: 0 !important;
+    }
+    .public-tab.table>tbody>tr>td{
+        font-size: 14px !important;
+        text-align: left !important;
+        border-bottom: #d0e8fd 1px dashed !important ;
+    }
+    .vendor-tab.table td .wid135{
+        width: 143px;
+        margin-left: 7px;
+        position: relative;
+        top: -10px;
+    }
+    .filter a{
+        color: #333 !important;
+    }
+    .vendor-tab.table td .wid135 p{
+        display: block;
+        width: 100%;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    .vendor-tab.table td .wid135 p em.href {
+        cursor: pointer;
+    }
+    .vendor-tab.table td p{
+        font-size: 14px;
+        text-align: left;
+    }
+    /*.vendor-tab.table>tbody>tr{*/
+    /*height: 252px;*/
+    /*}*/
+    .public-tab.table tbody.bottom-no tr td{
+        border-bottom: none!important ;
+    }
+    .edit-form .form-control{
+        height: 24px;
+        padding: 0;
+        text-align: center;
+        font-size: 12px;
+        border-radius: 3px;
+    }
+    .edit-form select.form-control{
+        padding-left: 10px;
+    }
+    .edit-form div{
+        text-align: left;
+    }
+    .wid88{
+        width: 88px;
+    }
+    .wid48{
+        width: 48px;
+    }
+    .wid85{
+        width: 75px;
+    }
+    .wid68{
+        width: 68px;
+    }
+    .wid40{
+        width: 40px;
+    }
+    .wid25{
+        width: 25px;
+        text-align: center !important;
+        padding-left: 0 !important;
+    }
+    .wid56{
+        width: 56px;
+    }
+    .wid90{
+        width: 90px;
+    }
+    .edit-form td div{
+        float: left;
+        height: 24px;
+        margin-top: 5px;
+        line-height: 24px;
+        width: 100%;
+    }
+    .edit-form td div.margin0{
+        margin-top: 0;
+    }
+    .edit-form td div.margin0 .width45{
+        width: 45px;
+    }
+    .edit-form td div span{
+        float: left;
+    }
+    .edit-form td div span:first-child{
+        margin-right: 2px;
+    }
+    .filter{
+        position: relative;
+    }
+    .edit-form button {
+        width: 56px;
+        height: 24px;
+        border: none;
+        color: #fff;
+        float: left;
+    }
+    .edit-form button.ok {
+        background: #33b401;
+    }
+    .edit-form button.off {
+        background: #f15601;
+        margin-bottom: 5px;
+    }
+    .edit-form button:hover{
+        background: #5078cb;
+    }
+    .public-tab.table>tbody>tr>td.padding0{
+        padding: 8px 0;
+    }
+    .public-tab.table tbody .padding0 div{
+        text-align: center;
+        width: 50px;
+    }
+    .public-tab.table tbody .padding0 div.edit-a{
+        margin-top: -4px;
+    }
+    .public-tab.table tbody .padding0 div.down-a{
+        margin-top: 0;
+    }
+    .public-tab.table tbody .padding0 div.marginL10{
+        margin-left: -10px;
+    }
+    .edit-form .reduce{
+        color: #faa002 !important;
+        margin: 0 !important;
+        margin-left: 2px !important;
+    }
+    .edit-form .add{
+        color: #2ea001 !important;
+        margin: 0 !important;
+    }
+    .public-tab.table tr td{
+        vertical-align: top !important;
+    }
+    .public-tab.table tr td.middle{
+        vertical-align: middle !important;
+        padding-left: 0;
+        position: relative;
+    }
+    .record-line{
+        min-height: 30px;
+        font-size: 12px;
+        line-height: 35px;
+    }
+    .text-center{
+        margin-top: 30px;
+    }
+    .text-center .col-xs-2 img{
+        margin-left: 95px;
+    }
+    .text-center .col-xs-4 p{
+        margin-top: 33px;
+        font-size: 14px;
+    }
+    /*查看大图*/
+    .vendor-tab .img{
+        position: relative;
+    }
+    .vendor-tab .img a{
+        width: 60px;
+        height: 60px;
+        display: inline-block;
+    }
+    .vendor-tab .img .hover-show,.vendor-tab .img .edit-img{
+        position: absolute;
+        width: 100%;
+        height: 100%;
+        background: rgba(0,0,0,.5);
+        left: 0;
+        top: 0;
+        font-size: 12px;
+        margin-top: 0;
+    }
+    .vendor-tab .img .hover-show{
+        top: 60px;
+    }
+    .vendor-tab .img:hover .hover-show{
+        top: 0;
+    }
+    .vendor-tab .img .hover-show a, .vendor-tab .img .edit-img a{
+        width: 100%;
+        height: 100%;
+        display: inline-block;
+        text-align: center;
+        line-height: 55px;
+        color: #fff !important;
+    }
+    .vendor-tab .img .hover-show i{
+        margin-right: 3px;
+    }
+    .vendor-tab .img .edit-img{
+
+    }
+    .vendor-tab .img .edit-img a img{
+        width: 38px;
+        height: 38px;
+    }
+    .vendor-tab .middle .prompt{
+        position: absolute;
+        bottom: 4px;
+        left: 0;
+        font-size: 10px;
+        /*color: #999;*/
+    }
+    .vendor-tab .middle .prompt em{
+        color: #ff0000;
+    }
+    .public-tab.table tr td.middle{
+        overflow: inherit;
+    }
+
+    .public-tab.table tr td.middle .img,.vendor-tab.table td .wid135{
+        margin-top: 15px;
+    }
+    .public-tab.table tr td.middle .img{
+        margin-top: 10px;
+    }
+    .public-tab.table tr td.middle div.marginL20{
+        margin-left: -20px;
+    }
+    .edit-form .error{
+        border: #f00 1px solid !important;
+    }
+
+    .edit-form .error:focus{
+        box-shadow: none;
+    }
+    .public-tab.table>tbody>tr>td div:last-child a.add[disabled], .public-tab.table>tbody>tr>td div:last-child a.reduce[disabled]{
+        color: #c7c7c7 !important;
+    }
+    .pro_management .table>tbody>tr>td div.img a.delete-img {
+        position: absolute;
+        top: 2px;
+        right: 0;
+        z-index: 20;
+        width: 20px;
+        height: 20px;
+        line-height: 16px;
+        border: none;
+    }
+    .pro_management .table>tbody>tr>td div.img a.delete-img i {
+        color: #fff;
+        font-size: 12px;
+    }
+    .public-tab.table tr td div span.switch{
+        width:39px;
+        height: 14px;
+        display: inline-block;
+    }
+    .public-tab.table tr td div span.switch button{
+        border: none;
+        position: relative;
+        top: 6px;
+        left: 5px;
+        width: 39px;
+        height: 14px;
+        background: url(static/img/icon/check-off.png) no-repeat center;
+    }
+    .public-tab.table tr td div span.switch button.active{
+        background: url("static/img/icon/check-ok.png") no-repeat center;
+    }
+
+    .text-overflow {
+        text-overflow: ellipsis;
+        overflow: hidden;
+        width: 100%;
+        white-space: nowrap;
+    }
+    .fa-minus-circle{
+        color: #faa002;
+    }
+
+    .edit-form td div span em.margin5{
+        margin-left: 5px;
+    }
+
+    .content-show .select-item{
+        width: 88px;
+        height: 24px;
+        border: 1px solid #a9a9a9;
+        font-size: 12px;
+        text-align: center;
+        border-radius: 3px;
+        padding-left: 6px;
+    }
+    .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 0 9px;
+    }
+    .edit-form td div span.marginL40{
+        margin-left: 45px;
+    }
+    .edit-form td div span.marginL27{
+        margin-left: 27px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        width: 92px;
+    }
+    .edit-form td div span.marginL10{
+        margin-left: 10px;
+    }
+    .edit-form td div span.marginL5{
+        margin-left: 5px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        width: 100%;
+    }
+    .filter i {
+        font-size: 16px;
+        font-weight: bold;
+    }
+    .filter:hover .fa-angle-up {
+        -webkit-transform: rotateZ(180deg);
+        -moz-transform: rotateZ(180deg);
+        -o-transform: rotateZ(180deg);
+        -ms-transform: rotateZ(180deg);
+        transform: rotateZ(180deg);
+        color: #5078cb !important;
+    }
+    .modal-open {
+        overflow-y: auto;
+        overflow-x: hidden;
+    }
+    .com_tab ul li{
+        margin-left: 0px;
+        position: relative;
+    }
+    .pro_management .com_tab ul li.active a{
+        border-bottom: #fff;
+        background: #5078cb;
+        color: #fff;
+    }
+    .pro_management .com_tab ul li::after{
+        background: url('static/img/vendor/images/downicon.png');
+        width: 11px;
+        height: 6px;
+        position: absolute;
+        bottom: 0px;
+        left: 50%;
+        content: ' ';
+        margin-left: -5px;
+        display: none;
+    }
+    .pro_management .com_tab ul li.active:after{
+        display: block
+    }
+
+    .pro_management .com_tab2 ul li.active a {
+        background: #fff;
+        color: #666
+    }
+    .pro_management .com_tab ul.distance li {
+        margin-left: 0px;
+        color: #fff
+    }
+    .pro_management .com_tab ul.distance li a{
+        padding: 0 5px;
+    }
+    /*限制非标和标准数量显示过多换行的问题*/
+    .com_tab2 ul.distance li {
+        min-width: 120px;
+        height: 40px;
+        line-height: 12px;
+        text-align: center;
+        color: #5078cb;
+        float: left;
+        margin-left: 25px;
+    }
+    .com_tab ul.distance li:first-child {
+        margin-right: 0px;
+    }
+    .com_tab ul li a {
+        min-width: 110px;
+        width: auto;
+    }
+    .com_tab ul.distance li a.standard{
+        min-width: 120px;
+        color: #666;
+        line-height: 40px;
+        border-top: 3px solid #fff
+    }
+    .com_tab ul.distance li a.standard em{
+        max-width: 45px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        color: #666;
+    }
+    .com_tab ul.distance li:hover a.standard em.count{
+        color: #f15601;
+    }
+    .com_tab ul.distance li.active a.standard em.count,.com_tab ul.distance li.active a.standard{
+        color: #fff;
+    }
+    .com_tab2 ul.distance li.active a.standard em.count, .com_tab2 ul.distance li.active a.standard{
+        color: #f15601
+    }
+    .com_tab2 ul.distance li.active a.standard{
+        border-top: 3px solid #f15601;
+        border-left: 1px solid #f15601;
+        border-right: 1px solid #f15601;
+    }
+    .com_tab ul.distance li.active:hover a.standard{
+        color: #f15601;
+
+    }
+    .com_tab2 ul.distance li a.standard{
+        transition: 0s all;
+    }
+    .com_tab2 ul.distance{
+        /*border-top: 3px solid #f15601;*/
+        border-bottom: 1px solid #f15601;
+    }
+    .com_tab ul.distance li:hover a.standard{
+        /*padding-top: 15px;*/
+        /*width: 112px;*/
+        color: #f15601;
+    }
+
+    .import-product {
+        border-radius: 3px;
+        width: 330px;
+        height: 170px;
+        left: 44%;
+    }
+    .import-product .content > i {
+        font-size: 12px;
+        float: right;
+        margin: 5px 5px 0 0;
+        color: #ddd;
+        cursor: pointer;
+    }
+    .import-product .content p a {
+        color: #5078cb;
+    }
+    .import-product .upload-content {
+        position: relative;
+        left: -29px;
+        margin-bottom: 10px !important;
+    }
+    .import-product .upload-content #upload_text {
+        width: 157px;
+        height: 25px;
+        border: #ccc 1px solid;
+        padding-left: 10px;
+        line-height: 25px;
+        font-size: 14px;
+    }
+    .import-product .upload-content i {
+        background: #5078cb;
+        width: 62px;
+        height: 25px;
+        display: inline-block;
+        text-align: center;
+        color: #fff;
+        line-height: 25px;
+        font-size: 12px;
+        position: absolute;
+        left: 232px;
+        top: 0;
+        border-left: #ccc 1px solid;
+        cursor: pointer;
+    }
+    .import-product .upload-content #uploadCommodity {
+        width: 218px;
+        height: 25px;
+        filter: alpha(opacity=0);
+        -moz-opacity: 0;
+        opacity: 0;
+        position: absolute;
+        left: 77px;
+        top: 0px;
+    }
+    .import-product h5 {
+        margin-bottom: 25px;
+    }
+    .import-result .content p {
+        padding: 0;
+    }
+    .import-result .content p span {
+        color: #5078cb;
+    }
+    .import-result .content h5 {
+        font-size: 14px;
+        margin-bottom: 10px;
+        margin-top: -10px;
+    }
+    .import-result .content h5 span {
+        color: red;
+    }
+    .import-result .content div a {
+        color: #fff !important;
+        background: #5078cb !important;
+    }
+
+    .import-result .content div span {
+        color: #4290f7;
+        cursor: pointer;
+    }
+
+    .Regulpic img {
+        width: 24px;
+        height: 27px;
+    }
+    .edit-form td div.forAdminLook {
+        width: 70px;
+        height: 25px;
+        color: #333;
+        font-size: 14px;
+        border: 1px solid #5078cb;
+        border-radius: 3px;
+        text-align: center;
+        margin-top: 4px;
+    }
+    div.forAdminLook {
+        margin: 0 auto;
+        width: 70px;
+        height: 25px;
+        color: #333;
+        font-size: 14px;
+        border: 1px solid #5078cb;
+        border-radius: 3px;
+        text-align: center;
+        line-height: 25px;
+        margin-top: 4px;
+        position: absolute;
+        background: #fff;
+        display: none
+    }
+    .ToforAdminLook .nopass:hover ~.forAdminLook {
+        display: block;
+    }
+
+    /*search部分*/
+    .search-check{
+        padding: 15px 20px 5px;
+        height:auto;
+    }
+
+    .search-check .search .form-control{
+        width: 300px;
+        float: left;
+        height: 34px;
+        border-radius: 2px;
+        box-shadow: none;
+        border:1px solid #5078cb;
+    }
+
+    .search-check .search button{
+        background: #5078cb;
+        border: #5078cb 1px solid;
+        border-left: none;
+        color: #fff;
+        border-radius: 2px;
+    }
+
+    .search-check .radio-block {
+        line-height: 36px;
+        margin-bottom:10px;
+        font-size: 14px;
+    }
+    .search-check .radio-block .radio-btn{
+        display:inline-block;
+        position: relative;
+        top: 2px;
+    }
+    .search-check .radio-block .radio-btn li{
+        margin: 0 10px;
+        font-size: 14px;
+        line-height: 34px;
+        padding:0 10px;
+        height:34px;
+        border:1px solid #bfbfbf;
+        border-radius:3px;
+        cursor:pointer;
+    }
+    .search-check .radio-block .radio-btn li.active{
+        border:1px solid #5078cb;
+        color:#5078cb;
+    }
+    .search-check .radio-block .radio-date{
+        display:inline-block;
+        vertical-align: middle;
+    }
+    .search-check .radio-block .radio-date .btn-default{
+        border: none;
+    }
+    .search-check .radio-block .radio-date .data-input{
+        float:left;
+        position:relative;
+    }
+    .search-check .radio-block .radio-date .data-input input{
+        width:120px;
+    }
+    .search-check .radio-block .radio-date .data-input button.open {
+        position: absolute;
+        right: 2px;
+        top: 2px;
+        width: 20px;
+        height: 30px;
+        background: url(static/img/user/images/xiala.png) right no-repeat #fff !important;
+        background-position-x: 100% !important;
+        border: none;
+    }
+    .search-check .radio-block .radio-date > em{
+        float: left;
+        line-height: 32px;
+        color: #999;
+        margin: 0 5px;
+    }
+    .search-check .radio-block .com-check-radio {
+        font-weight: normal;
+        color: #666;
+        margin-right: 13px;
+        cursor:pointer;
+    }
+    .search-check .radio-block .com-check-radio label {
+        margin-bottom:6px;
+    }
+    .search-check .search{
+        width:400px;
+        margin:0;
+    }
+
+    .wanted_list .btn-click{
+        padding: 0 10px;
+        display: inline-block;
+        height: 28px;
+        line-height: 28px;
+        text-align: center;
+        font-size: 14px;
+        color: #666;
+        border:1px solid #bfbfbf;
+        margin: 0 10px;
+    }
+    .wanted_list .btn-click:hover{
+        color: #5078cb;
+        cursor: pointer;
+        border:1px solid #5078cb;
+    }
+    .wanted_list .btn-toggle{
+        text-align: center;
+        font-size: 14px;
+        color: #5078cb;
+        cursor: pointer;
+    }
+
+    .wanted_list .table_title span{
+        display:inline-block;
+        line-height: 46px;
+        height:46px;
+        text-align: center;
+        font-size: 14px;
+        color:#333;
+        font-weight: bold;
+        vertical-align: middle;
+    }
+    .wanted_list .table_title span input{
+        position: relative;
+        top: 5px;
+    }
+    .wanted_list .table_title span:nth-child(1){width:110px;}
+    .wanted_list .table_title span:nth-child(2){width:270px;}
+    .wanted_list .table_title span:nth-child(3){width:130px;}
+    .wanted_list .table_title span:nth-child(4){width:130px;}
+    .wanted_list .table_title span:nth-child(5){width:180px;}
+    .wanted_list .table_title span:nth-child(6){width:180px;}
+    .wanted_list .wanted-tab{
+        table-layout:fixed;
+        background: #fff;
+        font-size: 14px;
+        color:#333;
+    }
+    .wanted_list .wanted-tab caption{
+        font-size: 14px;
+        line-height: 50px;
+        height:50px;
+        background: #fff;
+        padding:0 0 0 15px;
+        color:#333;
+    }
+    .wanted_list .wanted-tab thead>tr>th{
+        padding:0;
+        margin:0;
+        border:0;
+        line-height: 46px;
+        height:46px;
+        text-align: center;
+        font-size: 14px;
+        border-bottom: 1px solid #e9e9e9;
+    }
+    .wanted_list .wanted-tab tbody>tr>td{
+        padding:0;
+        line-height: 50px;
+        height:50px;
+        vertical-align: middle;
+        text-align: center;
+        font-size: 14px;
+        border-bottom: 1px solid #e9e9e9;
+    }
+    .wanted_list .wanted-tab tbody>tr>td input{
+        width:90%;
+        margin: 0 auto;
+    }
+    .wanted_list .wanted-tab tbody>tr>td input.form-control[readonly]{
+        border: 0 !important;
+        background: none;
+        box-shadow: none;
+        padding:0;
+        margin:0;
+    }
+    .wanted_list .table>tbody+tbody {
+         border:none;
+    }
+    .wanted_list .wanted-tab tbody.toggle-mode{
+        border: 2px solid #5078cb;
+    }
+    .wanted_list .wanted-tab tbody.toggle-mode >tr:first-child{
+        background: #f5f5f5;
+    }
+    .down-form{
+        position:relative;
+    }
+    .down-form ul{
+        position:absolute;
+        top:100%;
+        width:700px;
+        max-height:360px;
+        overflow-y:hidden;
+        border:1px solid #5078cb;
+        border-radius:5px;
+        background: #fff;
+        box-shadow: 0 0 5px rgba(0,0,0,.8);
+        margin-left:5px;
+    }
+    .down-form ul li{
+        line-height: 34px;
+        height:34px;
+        font-size: 14px;
+        color:#333;
+        text-align: left;
+        vertical-align:middle;
+    }
+    .down-form ul li span{
+        display:inline-block;
+        padding: 0 10px;
+        vertical-align:middle;
+    }
+    .down-form ul li span:nth-child(1){width:20%;}
+    .down-form ul li span:nth-child(2){width:20%;}
+    .down-form ul li span:nth-child(3){width: 30%;}
+    .down-form ul li span:nth-child(4){
+        width:25%;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+    .wanted_list .wanted-sub-tab{
+        margin: 0 auto;
+        width: 98%;
+    }
+    .wanted_list .wanted-sub-tab caption{}
+    .wanted_list .wanted-sub-tab caption span{
+        float:right;
+        margin-right:20px;
+    }
+    .wanted_list .wanted-sub-tab thead{}
+    .wanted_list .wanted-sub-tab thead tr{}
+    .wanted_list .wanted-sub-tab thead tr th{
+        font-weight: normal;
+    }
+    .wanted_list .wanted-sub-tab tbody{}
+    .wanted_list .wanted-sub-tab tbody tr{}
+    .wanted_list .wanted-sub-tab tbody tr td{}
+
+
+</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'}"><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 == 'onSale'}"><a ui-sref="vendor_onSale">在售产品</a></li>-->
+                <!--<li ng-class="{'active': tab == 'storage'}"><a ui-sref="vendor_storage">出入库</a></li>-->
+                <!--<li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架历史</a></li>-->
+                <!--<li ng-if="isPcbStore"><a ui-sref="vendor_upload">产品导入</a></li>-->
+                <li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material">产品库</a></li>
+                <li ng-class="{'active': tab == 'storage'}"><a ui-sref="vendor_storage">出入库</a></li>
+                <li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架记录</a></li>
+            </ul>
+        </div>
+        <div class="com_tab com_tab2" style="margin-bottom: 10px">
+            <ul class="fl distance" style="width: 100%">
+                <li ng-class="{active : storage_tab == 'inPut'}"  ng-click="toggleStorage('inPut')" title="入库"><a href="" class="standard">入库</a></li>
+                <li ng-class="{active : storage_tab =='outPut'}" ng-click="toggleStorage('outPut')" title="出库"><a href="" class="standard">出库</a></li>
+            </ul>
+        </div>
+        <div class="search-check">
+            <div class="radio-block" ng-if="handleItem !== 1">
+                更多筛选:
+                <label class="com-check-radio">
+                    <input type="radio" id="dateAll" name="date" ng-click="setFilters('dateArea', 'All')" ng-checked="dateArea == 'All'">
+                    <label for="dateAll"></label>
+                    全部
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="oneMonth" name="date" ng-click="setFilters('dateArea', 'oneMonth')" ng-checked="dateArea == 'oneMonth'">
+                    <label for="oneMonth"></label>
+                    一个月
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="threeMonth" name="date" ng-click="setFilters('dateArea', 'threeMonth')" ng-checked="dateArea == 'threeMonth'">
+                    <label for="threeMonth"></label>
+                    三个月
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="sixMonth" name="date" ng-click="setFilters('dateArea', 'sixMonth')" ng-checked="dateArea == 'sixMonth'">
+                    <label for="sixMonth"></label>
+                    六个月
+                </label>
+                <label class="com-check-radio">
+                    <input type="radio" id="autoMonth" name="date" ng-click="setFilters('dateArea', 'autoMonth')" ng-checked="dateArea == 'autoMonth'">
+                    <label for="autoMonth"></label>
+                    自定义
+                </label>
+                <div class="search fr check">
+                    <input type="text" class="form-control" ng-model="keyword" ng-search="onSearch()" placeholder="发货单/卖家"/>
+                    <button ng-click="onSearch()" style="float: left;">搜索</button>
+                    <!--<div class="operate-btn more-operate">-->
+                        <!--<span>更多操作</span>-->
+                        <!--<span class="expander">-->
+                        <!--<span ng-click="download()">导出选中</span>-->
+                        <!--<span ng-click="batchOperation(1)" name="delete-material">删除选中</span>-->
+                        <!--<span ng-click="batchOperation(2)">下架选中</span>-->
+                        <!--<span ng-click="modifyBatch()">批量修改</span>-->
+                    <!--</span>-->
+                    <!--</div>-->
+                    <form style="display: none;" id="down-load-goods" method="get">
+                        <input type="hidden" name="ids" ng-value="localInfo.ids">
+                    </form>
+                </div>
+            </div>
+            <div class="radio-block">
+                更多操作:
+                <ul class="radio-btn list-inline">
+                    <li ng-repeat="item in handleLink"
+                        ng-bind="item.name"
+                        ng-class="{'active': handleItem === item.id}"
+                        ng-if="item.tab === storage_tab"
+                        ng-click="toggleType(item)"></li>
+                </ul>
+                <div class="radio-date" ng-show="dateArea === 'autoMonth'">
+                    <div class="data-input">
+                        <input id="start" type="text" ng-model="startDate" readonly="readonly"
+                               class="form-control select-adder" placeholder="起始时间"
+                               datepicker-popup="yyyy-MM-dd"
+                               is-open="condition[0].open"
+                               current-text="今天" clear-text="清除" close-text="关闭"
+                               datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                               ng-click="openDatePicker($event, condition, 0,1)"
+                               ng-change="onDateCondition(1)"/>
+                        <button class="open" ng-click="openDatePicker($event, condition, 0)"></button>
+                    </div>
+
+                    <em>–</em>
+                    <div class="data-input">
+                        <input id="end" type="text" ng-model="endDate" readonly="readonly"
+                               class="form-control select-adder" placeholder="结束时间"
+                               datepicker-popup="yyyy-MM-dd"
+                               is-open="condition[1].open"
+                               current-text="今天" clear-text="清除" close-text="关闭"
+                               datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
+                               ng-click="openDatePicker($event, condition, 1, 2)"
+                               ng-change="onDateCondition(2)"/>
+                        <button class="open" ng-click="openDatePicker($event, condition, 1)"></button>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <div class="wanted_list">
+            <table class="wanted-tab table">
+                <thead>
+                <tr>
+                    <th width="120" ng-bind="storage_tab === 'inPut' ? '入库单号' : '出库单号'"></th>
+                    <th width="180" ng-bind="storage_tab === 'inPut' ? '*发货单' : '*订单号'" ng-if="handleItem === 2"></th>
+                    <th width="180" ng-bind="storage_tab === 'inPut' ? '卖家名称' : '买家名称'"></th>
+                    <th class="filter" width="110">
+                        <a ng-bind="selfSupport">全部类型</a> <i class="fa fa-angle-down fa-angle-up"></i>
+                        <div class="hover-show">
+                            <a ng-click="changeSupportType(selfSupportType.ALL)">全部类型</a>
+                            <a ng-click="changeSupportType(selfSupportType.SELF_SUPPORT)" ng-bind="storage_tab === 'inPut' ? '其它入库' : '其它出库'"></a>
+                            <a ng-click="changeSupportType(selfSupportType.CONSIGNMENT)" ng-bind="storage_tab === 'inPut' ? '销售入库' : '销售出库'"></a>
+                        </div>
+                    </th>
+                   <th width="90">录入人</th>
+                    <th width="170">录入日期</th>
+                    <th width="170" class="padding0">操作</th>
+                </tr>
+                </thead>
+
+                <!--查看出入库-->
+                <tbody ng-if="handleItem === 0" ng-repeat="item in lockData" ng-class="{'toggle-mode': item.seleted}">
+                <tr>
+                    <td>系统自动生成</td>
+                    <td ng-bind="item.maiName">深圳有陵县什么 翁一搂的</td>
+                    <td ng-bind="item.selfSupport">腌肉入库</td>
+                    <td ng-bind="item.uuid">张三</td>
+                    <td ng-bind="item.date">2018-12-12 12:!@:</td>
+                    <td><span class="btn-toggle" ng-show="item.seleted" ng-click="item.seleted = !item.seleted">收起 <i class="fa fa-angle-up"></i></span><span ng-click="item.seleted = !item.seleted" class="btn-toggle" ng-show="!item.seleted">展开 <i class="fa fa-angle-down"></i></span></td>
+                </tr>
+                <tr ng-show="item.seleted">
+                    <td colspan="6">
+                        <div class="sub-table-head">
+                            <table class="wanted-sub-tab table">
+                                <caption>
+                                    明细列表:
+                                    <span>所属订单:1231243243243543534543</span>
+                                </caption>
+                                <thead>
+                                <tr>
+                                    <th width="60">序号</th>
+                                    <th width="110">型号</th>
+                                    <th width="130">品牌</th>
+                                    <th>物料名称</th>
+                                    <th width="210">规格</th>
+                                    <th width="130">数量(PCS)</th>
+                                    <th width="130">单价</th>
+                                </tr>
+                                </thead>
+                            </table>
+                        </div>
+                        <div style="height:300px;overflow-y: auto;">
+                            <table class="wanted-sub-tab table">
+                                <tr ng-repeat="(index, list) in item.content">
+                                    <td width="60" ng-bind="index + 1">45325</td>
+                                    <td width="110" ng-bind="list.code">45325</td>
+                                    <td width="130" ng-bind="list.code1">45325</td>
+                                    <td ng-bind="list.code2">45325</td>
+                                    <td width="210" ng-bind="list.code3">45325</td>
+                                    <td width="130" ng-bind="list.code4">45325</td>
+                                    <td width="130" ng-bind="list.code5">45325</td>
+                                </tr>
+                            </table>
+                        </div>
+                    </td>
+                </tr>
+                </tbody>
+
+                <!--其它出入库-->
+                <tbody ng-if="handleItem === 1">
+                <tr>
+                    <td>系统自动生成</td>
+                    <td><input type="text" class="form-control"></td>
+                    <td>腌肉入库</td>
+                    <td>张三</td>
+                    <td>2018-12-12 12:!@:</td>
+                    <td><span class="btn-click">确认</span><span class="btn-click">取消</span></td>
+                </tr>
+                <tr>
+                    <td colspan="6">
+                        <table class="wanted-sub-tab table">
+                            <caption>
+                                明细列表:
+                            </caption>
+                            <thead>
+                            <tr>
+                                <th width="60">序号</th>
+                                <th width="110">型号</th>
+                                <th width="130">品牌</th>
+                                <th>物料名称</th>
+                                <th width="210">规格</th>
+                                <th width="130">数量(PCS)</th>
+                                <th width="130">单价</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr>
+                                <td>1</td>
+                                <td>
+                                    <div class="down-form">
+                                        <input type="text" class="form-control" ng-change="onChange()" ng-focus="onFocus($event)" ng-blur="onBlur()">
+                                        <ul class="list-unstyled">
+                                            <li>
+                                                <span>464it655-01k</span>
+                                                <span>panasonic</span>
+                                                <span>panasonic</span>
+                                                <span>panasonic</span>
+                                            </li>
+                                        </ul>
+                                    </div>
+                                </td>
+                                <td><input type="text" class="form-control" readonly></td>
+                                <td><input type="text" class="form-control" readonly></td>
+                                <td><input type="text" class="form-control" readonly></td>
+                                <td><input type="text" class="form-control"></td>
+                                <td><input type="text" class="form-control"></td>
+                            </tr>
+                            <tr>
+                                <td>1</td>
+                                <td>
+                                    <div class="down-form">
+                                        <input type="text" class="form-control" ng-change="onChange()" ng-focus="onFocus($event)" ng-blur="onBlur()">
+                                        <ul class="list-unstyled">
+                                            <li>
+                                                <span>464it655-01k</span>
+                                                <span>panasonic</span>
+                                                <span>panasonic</span>
+                                                <span>panasonic</span>
+                                            </li>
+                                        </ul>
+                                    </div>
+                                </td>
+                                <td><input type="text" class="form-control" readonly></td>
+                                <td><input type="text" class="form-control" readonly></td>
+                                <td><input type="text" class="form-control" readonly></td>
+                                <td><input type="text" class="form-control"></td>
+                                <td><input type="text" class="form-control"></td>
+                            </tr>
+                            <tr>
+                                <td>1</td>
+                                <td>
+                                    <div class="down-form">
+                                        <input type="text" class="form-control" ng-change="onChange()" ng-focus="onFocus($event)" ng-blur="onBlur()">
+                                        <ul class="list-unstyled">
+                                            <li>
+                                                <span>464it655-01k</span>
+                                                <span>panasonic</span>
+                                                <span>panasonic</span>
+                                                <span>panasonic</span>
+                                            </li>
+                                        </ul>
+                                    </div>
+                                </td>
+                                <td><input type="text" class="form-control" readonly></td>
+                                <td><input type="text" class="form-control" readonly></td>
+                                <td><input type="text" class="form-control" readonly></td>
+                                <td><input type="text" class="form-control"></td>
+                                <td><input type="text" class="form-control"></td>
+                            </tr>
+                            <tr>
+                                <td colspan="7">
+                                    <span class="btn-click">增加一</span>
+                                    <span class="btn-click">增加十条</span>
+                                    <span class="btn-click">清空</span>
+                                </td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </td>
+                </tr>
+                </tbody>
+
+                <!--采购出入库-->
+                <tbody ng-if="handleItem === 2" ng-repeat="item in lockData" ng-class="{'toggle-mode': item.seleted}">
+                <tr>
+                    <td>系统自动生成</td>
+                    <td>HFH32543256438403685</td>
+                    <td ng-bind="item.maiName">深圳有陵县什么 翁一搂的</td>
+                    <td ng-bind="item.selfSupport">腌肉入库</td>
+                    <td ng-bind="item.uuid">张三</td>
+                    <td ng-bind="item.date">2018-12-12 12:!@:</td>
+                    <td ng-if="!item.seleted"><span class="btn-click" ng-click="item.seleted = !item.seleted" ng-bind="storage_tab === 'inPut' ? '收货入库' : '发货出库'"></span></td>
+                    <td ng-if="item.seleted"><span class="btn-click">确定</span><span class="btn-click">取消</span></td>
+                </tr>
+                <tr ng-show="item.seleted">
+                    <td colspan="7">
+                        <div class="sub-table-head">
+                            <table class="wanted-sub-tab table">
+                                <caption>
+                                    明细列表:
+                                    <span>所属订单:1231243243243543534543</span>
+                                </caption>
+                                <thead>
+                                <tr>
+                                    <th width="60">序号</th>
+                                    <th width="110">型号</th>
+                                    <th width="130">品牌</th>
+                                    <th>物料名称</th>
+                                    <th width="210">规格</th>
+                                    <th width="130">数量(PCS)</th>
+                                    <th width="130">单价</th>
+                                </tr>
+                                </thead>
+                            </table>
+                        </div>
+                        <div style="height:300px;overflow-y: auto;">
+                            <table class="wanted-sub-tab table">
+                                <tr ng-repeat="(index, list) in item.content">
+                                    <td width="60" ng-bind="index + 1">45325</td>
+                                    <td width="110" ng-bind="list.code">45325</td>
+                                    <td width="130" ng-bind="list.code1">45325</td>
+                                    <td ng-bind="list.code2">45325</td>
+                                    <td width="210" ng-bind="list.code3">45325</td>
+                                    <td width="130"><input type="text" class="form-control"></td>
+                                    <td width="130" ng-bind="list.code5">45325</td>
+                                </tr>
+                            </table>
+                        </div>
+                    </td>
+                </tr>
+                </tbody>
+            </table>
+        </div>
+
+        <div class="wanted_list">
+            <!--在售产品-->
+            <div class="tab">
+                <table class="vendor-tab public-tab table">
+                    <thead>
+                    <tr>
+                        <th width="60" style="padding:8px 0;">
+                            <label class="check-active">
+                                <input ng-disabled="currenctGoods.length == 0" type="checkbox"  ng-click="chooseAllItem()" ng-checked="chooseAll || chooseAllPage" id="AllChoose"/>
+                                <label for="AllChoose"></label>
+                                <span>全选</span>
+                            </label>
+                        </th>
+                        <th width="220">产品信息</th>
+                        <th width="105">包装/生产日期</th>
+                        <th width="140">库存</th>
+                        <th width="105">梯度/pcs</th>
+                        <th ng-if="onsale.currency == 'USD'" width="116">单价<b style="font-size: 12px;font-weight: 600">($)</b></th>
+                        <th ng-if="onsale.currency == 'RMB'" width="116">单价<b style="font-size: 12px;font-weight: 600">(¥)</b></th>
+                        <th width="110">交期(天)</th>
+                        <th class="filter" width="100">
+                            <!--<a>{{selfSupport}}<i class="fa fa-angle-double-down angle-hover-up" aria-hidden="true"></i></a>-->
+                            <a ng-bind="selfSupport">销售方式</a> <i class="fa fa-angle-down fa-angle-up"></i>
+                            <div class="hover-show">
+                                <a ng-click="changeSupportType(selfSupportType.ALL)" title="销售方式">销售方式</a>
+                                <a ng-click="changeSupportType(selfSupportType.SELF_SUPPORT)" title="自营">自营</a>
+                                <a ng-click="changeSupportType(selfSupportType.CONSIGNMENT)" title="寄售">寄售</a>
+                            </div>
+                        </th>
+                        <th width="70" class="padding0">操作</th>
+                    </tr>
+                    </thead>
+                    <tbody class="bottom-no">
+                    <tr style="height: 14px;">
+                        <td colspan="10" class="hei16"></td>
+                    </tr>
+                    </tbody>
+                    <tbody ng-repeat="commodity in currenctGoods" ng-click="chooseOne(null, commodity)" class="edit-border">
+                    <!--非编辑状态自定义标签-->
+                    <tr class="define" ng-if="!commodity.edit">
+                        <td colspan="10">
+                            <div class="code">SKU编码 : <span ng-bind="commodity.batchCode">247823589235</span></div>
+                            <div class="labelling" ng-if="commodity.tag">
+                                <!--<em>*</em>-->
+                                自定义标签 : <span ng-bind="commodity.tag">散装出售散装出售</span>
+                            </div>
+                            <!--非标产品标志-->
+                            <img ng-if="!commodity.uuid" src="static/img/store/common/nonstandard.png" alt="" class="standard"/>
+                            <!--标准产品标志-->
+                            <img ng-if="commodity.uuid" src="static/img/store/common/standard.png" alt="" class="standard"/>
+                        </td>
+                    </tr>
+                    <tr class="edit-form" ng-if="!commodity.edit">
+                        <td class="middle padding0 check-input">
+                            <!-- <span><input type="checkbox" id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>-->
+                            <span name="check-one"><input type="checkbox" ng-checked="commodity.isChoosed" fid="{{$index+1}}"/><label for="{{$index+1}}"></label></span>
+                            <!--&lt;!&ndash;非标产品标志&ndash;&gt;-->
+                            <!--<img ng-if="!commodity.uuid" src="static/img/store/common/nonstandard.png" alt="" class="standard"/>-->
+                            <!--&lt;!&ndash;标产品标志&ndash;&gt;-->
+                            <!--<img ng-if="commodity.uuid" src="static/img/store/common/standard.png" alt="" class="standard"/>-->
+                        </td>
+                        <td class="middle"  style="vertical-align: top !important;">
+                            <div class="fl img marginL20">
+                                <a><img ng-src="{{commodity.img ? commodity.img : 'static/img/store/common/default.png'}}"/></a>
+                                <div class="hover-show" name="img-a">
+                                    <a ng-click="showImg(commodity.img || 'static/img/store/common/default.png')" title="查看大图"><i class="fa fa-search"></i>查看</a>
+                                </div>
+                            </div>
+                            <div class="fr wid135">
+                                <p ng-if="!commodity.uuid">品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></a></p>
+                                <p ng-if="commodity.uuid" name="brand-a"><a href="product/brand/{{commodity.branduuid}}" style="margin: 0; color: #333;" target="_blank">品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></a></p>
+                                <p ng-if="!commodity.uuid">物料名称: <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
+                                <p ng-if="commodity.uuid" name="kind-a"><a href="product/kind/{{commodity.kindUuid}}" style="margin: 0; color: #333;" target="_blank">物料名称: <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
+                                <p>型号: <em class="href" ng-bind="commodity.code" title="{{commodity.code}}"  ng-click="goToBatchDetail($event, commodity)">LPC1112</em></p>
+                                <p>规格: <em ng-bind="commodity.spec  || '-'" title="{{commodity.spec}}">LPC1112</em></p>
+                                <!--<div class="margin0">-->
+                                <!--<span class="marginL10">规格: </span>-->
+                                <!--<span ng-bind="commodity.spec  || '-'" title="{{commodity.spec}}" class="width45" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"></span>-->
+                                <!--</div>-->
+                            </div>
+                        </td>
+                        <td style="white-space: inherit;">
+                            <div>
+                                <span class="text-overflow marginL5" ng-bind="commodity.packaging || '无包装信息'" title="{{commodity.packaging}}"></span><br/>
+                            </div>
+                            <div class="margin0">
+                                <span ng-bind="commodity.produceDate || '-'" title="{{commodity.produceDate}}" class="marginL5"></span>
+                            </div>
+                            <div class="margin0">
+                                <span ng-if="commodity.breakUp" class="marginL5">可拆卖</span>
+                            </div>
+                        </td>
+                        <td>
+                            <div>
+                                <span class="marginL10">库存: </span>
+                                <span ng-bind="commodity.reserve" title="{{commodity.reserve}}"style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width: 80px;" ></span>
+                            </div>
+                            <div class="margin0">
+                                <span class="marginL10">最小起订量: </span>
+                                <span ng-bind="commodity.minBuyQty" title="{{commodity.minBuyQty}}" class="width45" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"></span>
+                            </div>
+                            <div class="margin0">
+                                <span class="marginL10">最小包装数: </span>
+                                <span ng-bind="commodity.minPackQty" title="{{commodity.minPackQty}}" class="width45" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"></span>
+                            </div>
+                        </td>
+                        <td>
+                            <div ng-repeat="price in commodity.prices" >
+                                <span title="{{price.start + '+'}}" ng-bind="price.start + '+'" class="marginL40" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:60px;"></span>
+                            </div>
+                        </td>
+                        <td ng-if="onsale.currency == 'USD'">
+                            <div  ng-repeat="price in commodity.prices" ng-if="price.uSDPrice" >
+                                <span title="{{price.uSDPrice | formateNumber : 6 | currencySysmbol : commodity.currencyName}}" ng-bind="price.uSDPrice | formateNumber : 6 | currencySysmbol : commodity.currencyName" class="marginL27"></span>
+                            </div>
+                        </td>
+                        <td ng-if="onsale.currency == 'RMB'">
+                            <div ng-repeat="price in commodity.prices" ng-if="price.rMBPrice">
+                                <span title="{{price.rMBPrice | formateNumber : 6 | currencySysmbol : commodity.currencyName}}" ng-bind="price.rMBPrice | formateNumber : 6 | currencySysmbol : commodity.currencyName" class="marginL27"></span>
+                            </div>
+                        </td>
+                        <td style="overflow: inherit;">
+                            <div ng-if="onsale.currency == 'RMB'" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+                                <span ng-if="commodity.b2cMaxDelivery && (commodity.b2cMaxDelivery != commodity.b2cMinDelivery)" ng-bind=" commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery" class="marginL40" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:60px;"></span>
+                                <span ng-if="commodity.b2cMaxDelivery && (commodity.b2cMaxDelivery == commodity.b2cMinDelivery)" ng-bind=" commodity.b2cMinDelivery" class="marginL40" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:60px;"></span>
+                            </div>
+                            <div ng-if="onsale.currency == 'USD'" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+                                <span ng-if="commodity.b2cMaxDelivery && (commodity.b2cMinDelivery != commodity.b2cMaxDelivery)" ng-bind=" commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery" class="marginL40"></span>
+                                <span ng-if="commodity.b2cMaxDelivery && (commodity.b2cMinDelivery == commodity.b2cMaxDelivery)" ng-bind=" commodity.b2cMinDelivery" class="marginL40"></span>
+                            </div>
+                            <div class="Regulpic">
+                                <span>规格书:</span>
+                                <!--<span ng-if="!commodity.Regulpic">-</span>-->
+                                <div ng-if="commodity.attach || commodity.productAttachSubmit" style="position: relative;display: inline-block;width: auto;margin-top: 0px" class="ToforAdminLook">
+                                    <a style="text-decoration: none;margin: 0px;border-bottom:0px" target="_blank" href="{{commodity.attach || commodity.productAttachSubmit.uploadAttach}}" class="Regulpica">
+                                        <div style="width:24px;height:26px;position: relative">
+                                            <img style="width:24px;height:26px" src="static/img/vendor/images/pdf.png"/>
+                                            <div class="zhezhaodang" ng-if="commodity.productAttachSubmit.uploadAttach"></div>
+                                        </div>
+                                    </a>
+                                    <img ng-if="commodity.productAttachSubmit.uploadAttach" src="static/img/vendor/images/fireinfo_icon.png" width="18" height="18" style="width:18px;height:18px;border: 0px;margin-left:5px;" class="nopass"/>
+                                    <div class="forAdminLook">待审核</div>
+                                </div>
+                                <div style="position: relative;display: inline-block;width: auto;margin-top: 0px" ng-if="!commodity.attach && !commodity.productAttachSubmit">-</div>
+                                <!--<div class="forAdminLook" style="margin-left: 35px;">待审核</div>-->
+                            </div>
+                        </td>
+                        <td>
+                            <div>
+                                <span ng-bind="(storeInfo.uuid != 'undefind' && commodity.storeid == storeInfo.uuid && storeInfo.storeName.indexOf('优软测试二') < 0 && storeInfo.storeName.indexOf('优软商城') < 0) ? '自营' : '寄售'"  style="text-align: center; width: 100%;"></span>
+                            </div>
+                        </td>
+                        <td class="padding0">
+                            <div ng-if="!commodity.sourceId" name="edit-a" class="edit-a"><span class="edit edits" ng-click="editCommodity(commodity, $event)">编辑</span></div><!--updateCommodityInfo(commodity, false)-->
+                            <div ng-if="commodity.sourceId"><a style="margin: 0;">来源UAS</a></div>
+                            <div ng-if="!commodity.sourceId" name="down-a" class="down-a"><span class='edits' ng-click="soldOut($event, commodity)">下架</span></div>
+                        </td>
+                    </tr>
+                    <!--编辑状态自定义标签-->
+                    <tr class="define defines" ng-if="commodity.edit">
+                        <td colspan="10">
+                            <div class="code">SKU编码 : <span ng-bind="commodity.batchCode">247823589235</span></div>
+                            <div class="labelling">
+                                <!--<em>*</em>-->
+                                自定义标签 : <input type="text" ng-blur="editTag(commodity)" ng-model="commodity.editTag" ng-change="changeTag(commodity)"
+                                               ng-class="{'error' : commodity.editTagInvalid}" maxlength="20"
+                                               placeholder="请设置产品标签"></div>
+                            <!--非标产品标志-->
+                            <img ng-if="!commodity.uuid" src="static/img/store/common/nonstandard.png" alt="" class="standard"/>
+                            <!--标准产品标志-->
+                            <img ng-if="commodity.uuid" src="static/img/store/common/standard.png" alt="" class="standard"/>
+                        </td>
+                    </tr>
+                    <tr class="edit-form edit-forms" ng-if="commodity.edit">
+                        <td colspan="9">
+                            <div class="bg-show">
+                                <div class="content-show width20">
+                                    <!--<div> {{$index + 1}}</div>-->
+                                </div>
+                                <div class="content-show width200">
+                                    <div class="fl img">
+                                        <a><img ng-src="{{commodity.editPic ? commodity.editPic : 'static/img/store/common/default.png'}}"/></a>
+                                        <div class="edit-img">
+                                            <a ng-click="commodity.editPic = null" class="delete-img" title="删除" ng-if="commodity.editPic"><i class="fa fa-trash"></i></a>
+                                            <a ng-click="editGoodsPicture(commodity.editPic || 'static/img/store/common/default.png', commodity)" title="修改图片"><img src="static/img/icon/update-img.png" /></a>
+                                        </div>
+                                    </div>
+                                    <div class="fr wid135" style="margin-top: 0px">
+                                        <p style="margin-top: 5px">
+                                            品牌:
+                                            <input style="border-radius: 3px;border: 1px solid #a9a9a9;height: 24px;line-height: 24px;width: 107px" type="text" ng-model="commodity.brandNameEn" style="width:106px" maxlength="25" ng-change="onBrandChange(commodity.brandNameEn)"/>
+                                        </p>
+                                        <p style="margin-top: 5px">
+                                            物料名称:
+                                            <input style="border-radius: 3px;border: 1px solid #a9a9a9;height: 24px;line-height: 24px;width: 79px" type="text" ng-model="commodity.kindNameCn" style="width:78px" maxlength="20" ng-change="onCodeChange(commodity.kindNameCn)"/>
+                                        </p>
+                                        <p style="margin-top: 5px">
+                                            型号:
+                                            <input style="border-radius: 3px;border: 1px solid #a9a9a9;height: 24px;line-height: 24px;width: 107px" type="text" ng-model="commodity.code" style="width:106px" maxlength="100" />
+                                        </p>
+                                        <p style="margin-top: 5px">
+                                            规格:
+                                            <input style="border-radius: 3px;border: 1px solid #a9a9a9;height: 24px;line-height: 24px;width: 107px" type="text" ng-model="commodity.spec" maxlength="50" style="width:106px"/>
+                                        </p>
+                                        <!--<p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>-->
+                                        <!--<p>物料名称: <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></p>-->
+                                        <!--<p>型号: <em ng-bind="commodity.code" title="{{commodity.code}}">LPC1112</em></p>-->
+                                        <!--<p>规格: <em ng-bind="commodity.spec || '-'" title="{{commodity.spec}}">LPC1112</em></p>-->
+                                        <!--<p>-->
+                                        <!--<span style="width: 32px;">规格: </span>-->
+                                        <!--<span><input style="width:90px" type="text"-->
+                                        <!--placeholder="请输入规格" maxlength="50" ng-model="commodity.spec" class="wid48 form-control"/></span>-->
+                                        <!--</p>-->
+                                    </div>
+                                </div>
+                                <div class="content-show width120">
+                                    <div>
+                                        <span><!--<input type="text" ng-blur="editPackaging(commodity, true)" ng-change="changePackaging(commodity)" placeholder="包装方式" maxlength="10" ng-model="commodity.editPackaging" ng-class="{'error' : commodity.editPackagingInvalid}" class="wid88 form-control"/>-->
+                                            <select ng-model="commodity.editPackaging" class="select-adder select-item" title="包装">
+                                                <option ng-repeat="item in packageArray" ng-click="showText(goods, item)">{{item}}</option>
+                                            </select>
+                                        </span>
+                                    </div>
+                                    <div>
+                                        <span><input type="text" ng-change="editProduceDateFa(commodity)" placeholder="生产日期" maxlength="12" ng-model="commodity.editProduceDate" ng-class="{'error' : commodity.editProduceDateInvalid}" class="wid88 form-control"/></span>
+                                    </div>
+                                    <div>
+                                        <span>可拆卖:</span>
+                                        <span class="switch"><button ng-class="{'active' : commodity.editBreakUp}" ng-click="toggleIsBreadUp(commodity)"></button></span>
+                                    </div>
+                                </div>
+                                <div class="content-show width130">
+                                    <div>
+                                        <span>库存: </span>
+                                        <span><input type="text" ng-blur="changeReserve(commodity)" ng-class="{'error' : commodity.editReserveInvalid}"
+                                                     placeholder="数量" maxlength="9" ng-model="commodity.editReserve" class="wid48 form-control"/></span>
+                                    </div>
+                                    <div>
+                                        <span>最小起订量: </span>
+                                        <span><input type="text" ng-change="updateStartNumber(commodity)" ng-blur="changeMinBuyQty(commodity)" ng-class="{'error' : commodity.editMinBuyQtyInValid}" placeholder="数量" maxlength="6" ng-model="commodity.editMinBuyQty" class="wid48 form-control"/></span>
+                                    </div>
+                                    <div>
+                                        <span>最小包装数: </span>
+                                        <span><input type="text" ng-blur="changeMinPackQty(commodity)"
+                                                     ng-class="{'error' : commodity.editMinPackQtyInValid}" placeholder="数量" maxlength="6" ng-model="commodity.editMinPackQty" class="wid48 form-control"/></span>
+                                    </div>
+                                </div>
+                                <div class="content-show width135">
+                                    <div ng-repeat="price in commodity.editPrices">
+                                        <span style="margin-right: 0;overflow: hidden;"><input type="text" ng-disabled="$index == 0" ng-blur="editQty(commodity, $index, false, price.start)" ng-class="{'error' : price.startInValid}" placeholder="数量"  ng-model="price.start" class="wid40 form-control fl"/><em class="fl margin5" ng-if="$last">以上</em></span>
+                                        <span ng-if="!$last">-</span>
+                                        <span ng-if="!$last"><input type="text" ng-blur="editQty(commodity, $index, true, price.end)" ng-class="{'error' : price.endInValid}" placeholder="数量" ng-model="price.end" class="wid40 form-control"/></span>
+                                    </div>
+                                </div>
+                                <div class="content-show width135" ng-if="onsale.currency == 'USD'">
+                                    <div style="width: 99px;" ng-repeat="price in commodity.editPrices">
+                                    <span ng-if="commodity.currencyName.indexOf('USD') > -1">
+                                        <form name="usdForm">
+                                            <input type="text" name="usd" ng-class="{'error' : price.priceInvalid}" placeholder="单价($)" autocomplete="off" ng-blur="changePrices(commodity.editPrices, price.uSDPrice, $index)" ng-model="price.uSDPrice" class="wid85 form-control" validata-price/>
+                                        </form>
+                                    </span>
+                                        <a name="reduce-a" class="reduce" ng-disabled="commodity.editPrices.length < 2" ng-click="deleteFragment(commodity, $index)"><i class="fa fa-minus-circle"></i></a>
+                                        <a name="add-a" class="add" ng-disabled="commodity.editPrices.length >= 3" ng-click="addFragment(commodity)"><i class="fa fa-plus-circle"></i></a>
+                                    </div>
+                                </div>
+                                <div class="content-show width100"  ng-if="onsale.currency == 'RMB'">
+                                    <div style="width: 99px;" ng-repeat="price in commodity.editPrices">
+                                    <span ng-if="commodity.currencyName.indexOf('RMB') > -1">
+                                        <form name="rmbForm">
+                                            <input type="text" name="rmb" ng-class="{'error' : price.priceInvalid}" placeholder="单价(¥)" autocomplete="off" ng-blur="changePrices(commodity.editPrices, price.rMBPrice, $index)" ng-model="price.rMBPrice" class="wid85 form-control" validata-price/>
+                                        </form>
+                                    </span>
+                                        <a name="reduce-a" class="reduce" ng-disabled="commodity.editPrices.length < 2" ng-click="deleteFragment(commodity, $index)"><i class="fa fa-minus-circle"></i></a>
+                                        <a name="add-a" class="add" ng-disabled="commodity.editPrices.length >= 3" ng-click="addFragment(commodity)"><i class="fa fa-plus-circle"></i></a>
+                                    </div>
+                                </div>
+                                <div class="content-show width90">
+                                    <div ng-if="onsale.currency == 'RMB'">
+                                        <!--<span>大陆:</span>-->
+                                        <span><input type="text" ng-class="{'error' : commodity.editMinDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, true, false, commodity)" placeholder="大陆最短交期" ng-model="commodity.editMinDelivery" class="wid25 form-control" oninput="if(value.length>3)value=value.slice(0,3)"/></span>
+                                        <span>-</span>
+                                        <span><input type="text" ng-class="{'error' : commodity.editMaxDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, false, false, commodity)" placeholder="大陆最长交期" ng-model="commodity.editMaxDelivery" class="wid25 form-control" oninput="if(value.length>3)value=value.slice(0,3)"/></span>
+                                    </div>
+                                    <div ng-if="onsale.currency == 'USD'">
+                                        <!--<span>香港:</span>-->
+                                        <span><input type="text" placeholder="香港最短交期" ng-class="{'error' : commodity.editMinDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, true, true, commodity)" ng-model="commodity.editMinDelivery" class="wid25 form-control" oninput="if(value.length>3)value=value.slice(0,3)"/></span>
+                                        <span>-</span>
+                                        <span><input type="text" placeholder="香港最长交期" ng-class="{'error' : commodity.editMaxDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, false, true, commodity)" ng-model="commodity.editMaxDelivery" class="wid25 form-control" oninput="if(value.length>3)value=value.slice(0,3)"/></span>
+                                    </div>
+                                    <div class="Regulpic">
+                                        <span>规格书:</span>
+                                        <div style="position: relative;display: inline-block;width: auto;margin-top: 0px" class="ToforAdminLook">
+                                            <a style="text-decoration: none;margin: 0px;border-bottom:0px" target="_blank" href="{{commodity.attach}}" class="Regulpica" ng-if="commodity.attach">
+                                                <img style="width:24px;height:26px" src="static/img/vendor/images/pdf.png"/>
+                                            </a>
+                                            <a class="Regulpica" ng-click="editRegulPicture(commodity.productAttachSubmit.uploadAttach || 'static/img/vendor/images/upload_file_icon.png', commodity)" ng-if="!commodity.attach" style="margin: 0px">
+                                                <div style="width:24px;height:26px;position: relative">
+                                                    <img style="width:24px;height:26px" src="static/img/vendor/images/pdf.png"/>
+                                                    <div class="zhezhaodang"></div>
+                                                </div>
+                                            </a>
+                                            <img ng-if="commodity.productAttachSubmit.uploadAttach" src="static/img/vendor/images/fireinfo_icon.png" width="18" height="18" style="width:18px;height:18px;border: 0px;margin-left:5px;" class="nopass"/>
+                                            <div class="forAdminLook">待审核</div>
+                                        </div>
+                                    </div>
+                                    <!--<div class="Regulpic">-->
+                                    <!--<span>规格书:</span>-->
+                                    <!--<img style="width:24px;height:26px;cursor: pointer" src="static/img/vendor/images/pdf.png" ng-click="editRegulPicture(commodity.Regulpic || 'static/img/store/common/default.png', commodity)"/>-->
+                                    <!--<img src="static/img/vendor/images/fireinfo_icon.png" width="18" height="18" style="width:18px;height:18px;border: 0px;margin-left:5px;"/>-->
+                                    <!--<div class="forAdminLook">待审核</div>-->
+                                    <!--</div>-->
+                                </div>
+                                <div class="content-show width70">
+                                    <div>
+                                        <span>
+                                            <select ng-change="changeSaleMode(commodity)" class="wid68 select-adder form-control" ng-model="commodity.editSelfSale">
+                                                <option value="1">自营</option>
+                                                <option value="2">寄售</option>
+                                            </select>
+                                        </span>
+                                    </div>
+                                </div>
+                                <div class="content-show width60">
+                                    <div>
+                                        <span name="save-a"><button class="ok" ng-mouseleave="recoveryBlur()" ng-mouseenter="impedeBlur()" ng-click="updateGoods(commodity, $index)">保存</button></span>
+                                    </div>
+                                    <div>
+                                        <span name="cancle-a"><button class="off" ng-click="cancleEdit(commodity)">取消</button></span>
+                                    </div>
+                                </div>
+                            </div>
+                        </td>
+                        <!--<td class="middle padding0 check-input">-->
+                        <!--<div>{{$index + 1}}</div>-->
+                        <!--</td>-->
+                        <!--<td class="middle"  style="vertical-align: top !important;">-->
+                        <!--<div class="fl img">-->
+                        <!--<a><img ng-src="{{commodity.editPic ? commodity.editPic : 'static/img/store/common/default.png'}}"/></a>-->
+                        <!--<div class="edit-img">-->
+                        <!--<a ng-click="commodity.editPic = null" class="delete-img" title="删除" ng-if="commodity.editPic"><i class="fa fa-trash"></i></a>-->
+                        <!--<a ng-click="editGoodsPicture(commodity.editPic || 'static/img/store/common/default.png', commodity)" title="修改图片"><img src="static/img/icon/update-img.png" /></a>-->
+                        <!--</div>-->
+                        <!--</div>-->
+                        <!--<div class="fr wid135">-->
+                        <!--<p>类目: <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></p>-->
+                        <!--<p>型号: <em ng-bind="commodity.code" title="{{commodity.code}}">LPC1112</em></p>-->
+                        <!--<p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>-->
+                        <!--</div>-->
+                        <!--</td>-->
+                        <!--<td>-->
+                        <!--<div>-->
+                        <!--<span><input type="text" ng-blur="editPackaging(commodity)" placeholder="包装方式" maxlength="10" ng-model="commodity.editPackaging" ng-class="{'error' : commodity.editPackagingInvalid}" class="wid88 form-control"/></span>-->
+                        <!--</div>-->
+                        <!--<div>-->
+                        <!--<span><input type="text" ng-blur="editProduceDateFa(commodity)" placeholder="生产日期" maxlength="11" ng-model="commodity.editProduceDate" ng-class="{'error' : commodity.editProduceDateInvalid}" class="wid88 form-control"/></span>-->
+                        <!--</div>-->
+                        <!--<div>-->
+                        <!--<span>可拆卖:</span>-->
+                        <!--<span class="switch"><button ng-class="{'active' : commodity.editBreakUp}" ng-click="toggleIsBreadUp(commodity)"></button></span>-->
+                        <!--</div>-->
+                        <!--</td>-->
+                        <!--<td>-->
+                        <!--<div>-->
+                        <!--<span>库存: </span>-->
+                        <!--<span><input type="text" ng-blur="changeReserve(commodity)" ng-class="{'error' : commodity.editReserveInvalid}" placeholder="库存" ng-model="commodity.editReserve" class="wid48 form-control"/></span>-->
+                        <!--</div>-->
+                        <!--<div>-->
+                        <!--<span>起订量: </span>-->
+                        <!--<span><input type="text" ng-blur="changeMinBuyQty(commodity)" ng-class="{'error' : commodity.editMinBuyQtyInValid}" placeholder="起拍" ng-model="commodity.editMinBuyQty" class="wid48 form-control"/></span>-->
+                        <!--</div>-->
+                        <!--<div>-->
+                        <!--<span>包装数量: </span>-->
+                        <!--<span><input type="text" ng-blur="changeMinPackQty(commodity)" ng-class="{'error' : commodity.editMinPackQtyInValid}" placeholder="倍数" ng-model="commodity.editMinPackQty" class="wid48 form-control"/></span>-->
+                        <!--</div>-->
+                        <!--&lt;!&ndash;<div>&ndash;&gt;-->
+                        <!--&lt;!&ndash;<span>&ndash;&gt;-->
+                        <!--&lt;!&ndash;<select class="wid85 select-adder form-control" style="width: 81px;">&ndash;&gt;-->
+                        <!--&lt;!&ndash;<option value="1">可拆卖</option>&ndash;&gt;-->
+                        <!--&lt;!&ndash;<option value="2">不可拆卖</option>&ndash;&gt;-->
+                        <!--&lt;!&ndash;</select>&ndash;&gt;-->
+                        <!--&lt;!&ndash;</span>&ndash;&gt;-->
+                        <!--&lt;!&ndash;</div>&ndash;&gt;-->
+                        <!--</td>-->
+                        <!--<td>-->
+                        <!--<div ng-repeat="price in commodity.editPrices">-->
+                        <!--<span style="margin-right: 0;overflow: hidden;"><input type="text" ng-blur="editQty(commodity, $index, false, price.start)" ng-class="{'error' : price.startInValid}" placeholder="数量"  ng-model="price.start" class="wid40 form-control fl"/><em class="fl margin5" ng-if="$index == (commodity.editPrices.length-1)">以上</em></span>-->
+                        <!--<span ng-if="$index != (commodity.editPrices.length-1)">-</span>-->
+                        <!--<span ng-if="$index != (commodity.editPrices.length-1)"><input type="text" ng-blur="editQty(commodity, $index, true, price.end)" ng-class="{'error' : price.endInValid}" placeholder="数量" ng-model="price.end" class="wid40 form-control"/></span>-->
+                        <!--</div>-->
+                        <!--</td>-->
+                        <!--<td ng-if="onsale.currency == 'USD'">-->
+                        <!--<div style="width: 99px;" ng-repeat="price in commodity.editPrices">-->
+                        <!--<span ng-if="commodity.currencyName.indexOf('USD') > -1">-->
+                        <!--<form name="usdForm">-->
+                        <!--<input type="text" name="usd" ng-blur="priceBlur(price, true)" ng-keyup="priceValid(price, true)" ng-class="{'error' : price.usdPriceInvalid}" placeholder="香港交货($)" autocomplete="off" ng-model="price.uSDPrice" ng-model-options="{debounce : 100}" class="wid85 form-control"/>-->
+                        <!--</form>-->
+                        <!--</span>-->
+                        <!--<a name="reduce-a" class="reduce" ng-disabled="commodity.editPrices.length < 2" ng-click="deleteFragment(commodity, $index)"><i class="fa fa-minus-circle"></i></a>-->
+                        <!--<a name="add-a" class="add" ng-disabled="commodity.editPrices.length >= 3" ng-click="addFragment(commodity)"><i class="fa fa-plus-circle"></i></a>-->
+                        <!--</div>-->
+                        <!--</td>-->
+                        <!--<td ng-if="onsale.currency == 'RMB'">-->
+                        <!--<div style="width: 99px;" ng-repeat="price in commodity.editPrices">-->
+                        <!--<span ng-if="commodity.currencyName.indexOf('RMB') > -1">-->
+                        <!--<form name="rmbForm">-->
+                        <!--<input type="text" name="rmb" ng-blur="priceBlur(price, false)" ng-keyup="priceValid(price, false)" ng-class="{'error' : price.rmbPriceInvalid}" placeholder="大陆交货(¥)" autocomplete="off" ng-model="price.rMBPrice" ng-model-options="{debounce : 100}" class="wid85 form-control"/>-->
+                        <!--</form>-->
+                        <!--</span>-->
+                        <!--<a name="reduce-a" class="reduce" ng-disabled="commodity.editPrices.length < 2" ng-click="deleteFragment(commodity, $index)"><i class="fa fa-minus-circle"></i></a>-->
+                        <!--<a name="add-a" class="add" ng-disabled="commodity.editPrices.length >= 3" ng-click="addFragment(commodity)"><i class="fa fa-plus-circle"></i></a>-->
+                        <!--</div>-->
+                        <!--</td>-->
+                        <!--<td>-->
+                        <!--<div ng-if="onsale.currency == 'RMB'">-->
+                        <!--&lt;!&ndash;<span>大陆:</span>&ndash;&gt;-->
+                        <!--<span><input type="text" ng-class="{'error' : commodity.editMinDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, true, false, commodity)" placeholder="大陆最短交期" ng-model="commodity.editMinDelivery" class="wid25 form-control"/></span>-->
+                        <!--<span>-</span>-->
+                        <!--<span><input type="text" ng-class="{'error' : commodity.editMaxDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, false, false, commodity)" placeholder="大陆最长交期" ng-model="commodity.editMaxDelivery" class="wid25 form-control"/></span>-->
+                        <!--</div>-->
+                        <!--<div ng-if="onsale.currency == 'USD'">-->
+                        <!--&lt;!&ndash;<span>香港:</span>&ndash;&gt;-->
+                        <!--<span><input type="text" placeholder="香港最短交期" ng-class="{'error' : commodity.editMinDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, true, true, commodity)" ng-model="commodity.editMinDelivery" class="wid25 form-control"/></span>-->
+                        <!--<span>-</span>-->
+                        <!--<span><input type="text" placeholder="香港最长交期" ng-class="{'error' : commodity.editMaxDeliveryinValid}" ng-blur="changeDelivery(commodity.editMinDelivery, commodity.editMaxDelivery, false, true, commodity)" ng-model="commodity.editMaxDelivery" class="wid25 form-control"/></span>-->
+                        <!--</div>-->
+
+                        <!--</td>-->
+                        <!--<td>-->
+                        <!--<div>-->
+                        <!--<span>-->
+                        <!--<select ng-change="changeSaleMode(commodity)" class="wid68 select-adder form-control" ng-model="commodity.editSelfSale">-->
+                        <!--<option value="1">自营</option>-->
+                        <!--<option value="2">寄售</option>-->
+                        <!--</select>-->
+                        <!--</span>-->
+                        <!--</div>-->
+                        <!--</td>-->
+                        <!--<td class="padding0">-->
+                        <!--<div>-->
+                        <!--<span-->
+                        <!--name="cancle-a"><button class="off" ng-click="cancleEdit(commodity)">取消</button></span>-->
+                        <!--</div>-->
+                        <!--<div>-->
+                        <!--<span-->
+                        <!--name="save-a"><button class="ok" ng-click="updateGoods(commodity, $index)">保存</button></span>-->
+                        <!--</div>-->
+                        <!--</td>-->
+                    </tr>
+                    </tbody>
+                    <tbody ng-if="!currenctGoods || currenctGoods.length <= 0">
+                    <tr style="height: 252px;">
+                        <td colspan="12">
+                            <div class="empty">
+                                <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>
+                        </td>
+                        <!--<td colspan="10" style="padding: 74px 0;">-->
+                        <!--<div style="line-height: 106px;">-->
+                        <!--<div class="col-xs-2" style="margin-left: 35%;">-->
+                        <!--<img src="static/img/all/empty-cart.png">-->
+                        <!--</div>-->
+                        <!--<div class="col-xs-4 text-right" style="line-height: 124px;">-->
+                        <!--<p class="grey f14">-->
+                        <!--暂无产品信息,赶快上传让更多人看到你的产品吧!-->
+                        <!--<a href="vendor#/vendor_upload" style="margin-left:20px;font-size: 14px;color:#5078cb"><i class="fa fa-mail-reply"></i>&nbsp;马上去上传</a>-->
+                        <!--</p>-->
+                        <!--</div>-->
+                        <!--</div>-->
+                        <!--</td>-->
+                    </tr>
+                    </tbody>
+                    <tbody>
+                    <tr class="no-hover batch-tr" ng-if="(chooseAll || chooseAllPage) && currenctGoods.length != 0">
+                        <td colspan="9">
+                            <div class="batch-line" ng-if="chooseAll && !chooseAllPage">
+                                已选中当前页
+                                <em class="red" ng-bind="goodsAll.numberOfElements"></em>个产品,
+                                <a ng-click="turnAllPage()" class="blue">点击此处</a>切换选中所有页面<em class="red" ng-bind="goodsAll.totalElements"></em>个产品
+                            </div>
+                            <div class="batch-line" ng-if="chooseAllPage">
+                                已选中所有页面
+                                <em class="red" ng-bind="goodsAll.totalElements"></em>个产品,
+                                <a ng-click="cancelAllPage()" class="blue">点击此处</a>全部取消选中
+                            </div>
+                        </td>
+                    </tr>
+                    <!--<tr class="no-hover batch-tr" ng-if="chooseAll && !chooseAllPage" ng-class="{'active': $data.length > 10}">-->
+                    </tbody>
+                </table>
+                <div class="record-line text-right" ng-if="currenctGoods.length != 0">显示 {{(param.page - 1) * 10 + 1}}-
+                    <span ng-bind="endNumber"></span>, 共: <span ng-bind="goodsAll.totalElements" style="color: #5078cb;"></span> 个</div>
+                <div class="ng-cloak ng-table-pager" style="text-align: right;margin-right: 60px;" ng-if="goodsAll.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-keyup="listenEnter()"/>
+                        <a class="page-a" ng-click="setPage('page', param.currentPage)" href="">GO</a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<!--下架操作-->
+<div class="com-modal-wrap" ng-if="isSoldOut" ng-click="cancleSoldOut($event)" style="display:none">
+    <div class="com-out-box">
+        <div class="title">
+            <a ng-click="cancleSoldOut()"><i class="fa fa-close fa-lg"></i></a>
+        </div>
+        <div class="content">
+            <p><i class="fa fa-exclamation-circle"></i>确认下架?</p>
+            <div><a ng-click="cancleSoldOut()">取消</a><a ng-click="updateCommodityInfo(soldOutCommodity)">确认</a></div>
+        </div>
+    </div>
+</div>
+<div class="com-modal-wrap" ng-if="batchStatus" ng-click="cancelBatch($event)" style="display:none">
+    <div class="com-out-box">
+        <div class="title">
+            <a ng-click="cancelBatch()"><i class="fa fa-close fa-lg"></i></a>
+        </div>
+        <div class="content">
+            <p><i class="fa fa-exclamation-circle"></i>{{batchTitle}}</p>
+            <div class="red" ng-if="batchType==1">*<i ng-if="batchType==1">已有交易记录的产品无法删除</i>
+            </div>
+            <div>
+                <a ng-click="cancelBatch()">取消</a>
+                <a ng-if="batchType==1" ng-click="batchDelete()">确认</a>
+                <a ng-if="batchType==2" ng-click="batchDown()">确认</a>
+            </div>
+        </div>
+    </div>
+</div>
+
+<!--查看大图-->
+<div id="image-box"
+     style="display: none">
+    <div class="x-floating-wrap"></div>
+    <div class="x-floating">
+        <div id="item-content">
+            <div class="x-close-wrap"><a href="javascript:void(0);">×</a></div>
+            <div class="img"><img/></div>
+        </div>
+    </div>
+</div>
+
+<div class="com-modal-wrap" ng-show="batchModify" style="display:none">
+    <div class="com-mall-del-box import-product">
+        <div class="content">
+            <i class="fa fa-close" ng-click="batchModify=false"></i>
+            <p><i class="fa fa-exclamation-circle"></i>请先<a ng-click="download()">导出产品信息</a>,将内容修改后重新导入</p>
+            <div class="upload-content">
+                <input type="text" name="txt" id="upload_text">
+                <i>选择文件</i>
+                <input type="file" id="uploadCommodity" ng-file-select="" ng-change="selectFile()" accept="*.xls,*.xlsx" ng-model="myFile" ng-multiple="false" />
+                <!--<input type="file" id="uploadCommodity">-->
+            </div>
+            <h5>温馨提示:仅修改现有产品信息</h5>
+            <div>
+                <a ng-click="batchModify=false">取消</a>
+                <a ng-click="importExcel()">导入</a>
+            </div>
+        </div>
+    </div>
+</div>
+
+
+<div class="com-modal-wrap" ng-show="modifyResult" style="display:none">
+    <div class="com-mall-del-box import-result">
+        <div class="title" ng-click="modifyResult=false">
+            <i></i>
+        </div>
+        <div class="content">
+            <p><i class="fa fa-exclamation-circle"></i><span ng-bind="modifyData.success">583</span>个产品修改成功,</p>
+            <h5><span class="red" ng-bind="modifyData.filter">5</span>个产品修改失败!</h5>
+            <div>
+                <a ng-click="modifyResult=false">确定</a>
+                <span ng-if="modifyData.filter" ng-click="downloadExcel()">下载失败列表</span>
+                <form id="load-error" style="display: none;" method="get">
+                    <input type="hidden" name="batch" ng-value="modifyData.batch">
+                </form>
+            </div>
+        </div>
+    </div>
+</div>
+<style>
+    /**/
+    .wanted_list .empty{
+        overflow: hidden;
+        width:100%;
+        display:inline-flex;
+        justify-content:center;
+        align-items: center;
+        height:360px;
+    }
+    .wanted_list .empty-info{
+        line-height: 28px;
+        padding-top:10px;
+        margin-left:10px;
+        text-align:left;
+    }
+    .wanted_list .empty-info .grey{
+        color: #999;
+        font-size: 14px;
+    }
+    .wanted_list .empty .empty-info>a{
+        font-size: 14px;
+        color: #5078cb;
+    }
+    .wanted_list .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;
+    }
+    .device .wanted_list a.Regulpica:hover{
+        border-bottom: 0 !important;
+    }
+    .zhezhaodang {
+        position: absolute;
+        left: 0;
+        top: 0;
+        width: 24px !important;
+        height: 26px !important;
+        background: url('static/img/vendor/images/upload_file_no_pass.png') no-repeat 0px 0px;
+        background-size: 100% 100%;
+        margin-top: 0px !important;;
+    }
+</style>
+<script>
+    $(function(){
+        $(document).on('click', function () {
+            if ($(document).scrollTop() + $(window).height() < $('.record-line').offset().top + $('.record-line').height()) {
+                $('.wanted_list .tab table>tbody>tr.batch-tr').addClass('active')
+            } else {
+                $('.wanted_list .tab table>tbody>tr.batch-tr').removeClass('active')
+            }
+        })
+        $(window).bind("scroll",function() {
+            if ($(document).scrollTop() + $(window).height() < $('.record-line').offset().top + $('.record-line').height()) {
+                $('.wanted_list .tab table>tbody>tr.batch-tr').addClass('active')
+            } else {
+                $('.wanted_list .tab table>tbody>tr.batch-tr').removeClass('active')
+            }
+        });
+    })
+</script>

+ 9 - 5
src/main/webapp/resources/view/vendor/forstore/vendor_undercarriage.html

@@ -601,11 +601,15 @@
     <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 == 'onSale'}"><a ui-sref="vendor_onSale">在售产品</a></li>
-                <li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架历史</a></li>
-                <li ng-if="isPcbStore"><a ui-sref="vendor_upload">产品导入</a></li>
+                <!--<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 == 'onSale'}"><a ui-sref="vendor_onSale">在售产品</a></li>-->
+                <!--<li ng-class="{'active': tab == 'storage'}"><a ui-sref="vendor_storage">出入库</a></li>-->
+                <!--<li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架历史</a></li>-->
+                <!--<li ng-if="isPcbStore"><a ui-sref="vendor_upload">产品导入</a></li>-->
+                <li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material">产品库</a></li>
+                <li ng-class="{'active': tab == 'storage'}"><a ui-sref="vendor_storage">出入库</a></li>
+                <li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage">上下架记录</a></li>
             </ul>
         </div>
         <div class="search-check">

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

@@ -538,6 +538,7 @@
                 <li><a ui-sref="vendor_material">公司产品库</a></li>
                 <li><a ui-sref="vendor_material_person">个人产品库</a></li>
                 <li><a ui-sref="vendor_onSale">在售产品</a></li>
+                <li><a ui-sref="vendor_storage">出入库</a></li>
                 <li><a ui-sref="vendor_undercarriage">上下架历史</a></li>
                 <li class="active"><a ui-sref="vendor_upload">产品导入</a></li>
             </ul>