Browse Source

处理买家中心产品导入

wangcz 7 years ago
parent
commit
6a701c5fbb

+ 5 - 5
src/main/webapp/resources/js/usercenter/app.js

@@ -441,12 +441,12 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'commo
 			templateUrl: 'static/view/usercenter/forstore/bomListDetail.html',
 			controller: 'bomListDetailCtrl',
 			controllerUrl: 'app/controllers/forstore/bomListDetailCtrl'
-        })).state('vendor_upload', angularAMD.route({
+        })).state('product_upload', angularAMD.route({
             title : '产品导入',
-            url : '/vendor_upload',
-            templateUrl : 'static/view/vendor/forstore/vendor_upload.html',
-            controllerUrl : "js/vendor/controllers/forstore/vendor_upload_ctrl",
-            controller : 'vendorUploadCtrl'
+            url : '/product_upload',
+            templateUrl : 'static/view/usercenter/forstore/product_upload.html',
+            controllerUrl : "app/controllers/forstore/product_upload_ctrl",
+            controller : 'productUploadCtrl'
 		}));
 	}]);
 

+ 643 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/product_upload_ctrl.js

@@ -0,0 +1,643 @@
+define([ 'app/app' ], function(app) {
+	'use strict';
+	app.register.controller('vendorUploadCtrl', ['$scope', '$rootScope', 'ngTableParams', '$upload', '$q', 'AuthenticationService', 'BaseService', 'StoreInfo', 'SessionService', '$modal', 'toaster', 'ReleaseProductByBatch', 'Loading', 'Enterprise', 'DistributionRule', '$state', '$location', function ($scope, $rootScope, ngTableParams, $upload, $q, AuthenticationService, BaseService, StoreInfo, SessionService, $modal, toaster, ReleaseProductByBatch, Loading, Enterprise, DistributionRule, $state, $location) {
+        $scope.ignoreImport = 1;
+	    if (!$rootScope.$$productOn) {
+            $rootScope.$$productOn = {};
+            $rootScope.$$productOn.leadIn = 'bathOn';
+            $rootScope.$$productOn.tab = 'bathOnPerson';
+        }
+		$rootScope.active = 'vendor_upload';
+		document.title = '产品导入-优软商城';
+        //切换展示的信息
+        $scope.toggleActive = function(active) {
+            if($scope.tab != active) {
+                $rootScope.$$productOn.tab = active;
+                $state.reload();
+            }
+        };
+
+        if ($location.$$search.type && $location.$$search.type == 'self') {
+            $rootScope.$$productOn.tab = 'bathOnPerson';
+        } else if ($location.$$search.type && $location.$$search.type == 'company'){
+            $rootScope.$$productOn.tab = 'bathOn';
+        }
+        $scope.deletePop = false;
+        $scope.personMedol =false;
+        $scope.setPersonMedol = function () {
+            $scope.personMedol =false;
+        };
+
+        $scope.showTip = true;
+
+        $scope.closeTip = function () {
+            $scope.showTip = false;
+        }
+
+        //获取币别信息
+        Enterprise.getCurrencyByRegisterAddress(null, function (data) {
+            if(data.code == 1) {
+                $scope.batch.currency = data.data;
+            }else {
+                toaster.pop('info', '提示', '您公司的注册地址为空,无法确定币别,系统默认为人民币');
+                $scope.batch.currency = 'RMB';
+            }
+        }, function (response) {
+            toaster.pop('info', '提示', '获取不到公司的币别信息');
+        });
+
+        $scope.batch = {};
+        $scope.batch.myFiles = null;
+        //批量发布的类型
+        $scope.batch.sellType = null;
+
+		$scope.switchImport = function (type) {
+			$scope.ignoreImport = type;
+		};
+
+        //翻页的信息
+        $scope.pageParams = {};
+
+		// 自营店铺选择寄售提示框
+		$scope.showSelfSellRemindBox = false;
+
+		$scope.setShowSelfSellRemindBox = function (flag, type) {
+			if (type && type == 'no') {
+				$scope.sellType('self');
+			}
+			$scope.showSelfSellRemindBox = flag;
+		}
+
+		//选择相应的销售类型
+		$scope.sellType = function(type) {
+        if (type == 'self') {
+            $scope.batch.selfSellEabled && ($scope.batch.sellType = 'self');
+        } else if (type == 'UAS') {
+            if (!$rootScope.isPcbStore) {
+                $scope.batch.sellType = 'UAS';
+                $scope.setShowSelfSellRemindBox(true);
+            }
+        }
+        // if($scope.batch.selfSellEabled) {
+    // $scope.batch.sellType = type;
+    // if (type == 'UAS') {
+        //         $scope.setShowSelfSellRemindBox(true);
+    // }
+        // } else {
+    // $scope.batch.sellType = 'UAS';
+        // }
+
+    };
+
+    //上架信息展示
+    $scope.relTableParams = new ngTableParams({
+        count : 10,
+        page : 1
+    }, {
+        total : 0,
+        getData : function($defer, params) {
+            var param = BaseService.parseParams(params.url());
+            if($scope.result && $scope.result.batch) {
+                param.batch = $scope.result.batch;
+                ReleaseProductByBatch.getPageBatchRelease(param, function(page) {
+                    $defer.resolve(page.content);
+                    params.total(page.totalElements);
+                    $scope.pageParams.number = page.number;
+                    $scope.pageParams.content = page.content;
+                    $scope.pageParams.totalElements = page.totalElements;
+                    $scope.pageParams.totalPages = page.totalPages;
+                    $scope.pageParams.start = ((page.number - 1) * page.size) + 1;
+                    $scope.pageParams.end =  page.number * page.size;
+                    if($scope.pageParams.end > $scope.pageParams.totalElements) {
+                        $scope.pageParams.end = $scope.pageParams.totalElements
+                    }
+                }, function(data) {
+                    toaster.pop();
+                });
+            }
+        }
+    });
+
+    /**
+     * 打开删除的模态框
+     */
+    $scope.showDelete = function (item) {
+        var modalInstance = $modal.open({
+            animation: true,
+            templateUrl: 'static/view/common/modal/delete_modal.html',
+            controller: 'product_delete_ctrl',
+            resolve: {
+                id : function() {
+                    return item.id;
+                }
+            }
+        });
+        modalInstance.result.then(function(){
+            if (item.releaseCode == 112){
+                $scope.result.success = $scope.result.success - 1;
+            }else if(item.releaseCode == 113){
+                $scope.result.failure = $scope.result.failure - 1;
+            }
+            //不需要返回的第一页
+            $scope.relTableParams.reload();
+        }, function(){
+        });
+    };
+
+    var initRuleCount = function () {
+        return DistributionRule.findCountOfActiveRule({},{},function (data) {
+            if (data.success){
+                $scope.needShowTip = data.data;
+            }
+        }, function (error) {
+            toaster.pop("error", error.data);
+        })
+    };
+    initRuleCount();
+
+    // 查看范例
+    $scope.showImg = function() {
+        var src = '';
+        if($scope.batch.currency === 'RMB') {
+            src = $rootScope.rootPath + "/static/img/product/releaseByBatch-rmb.png";
+        }else {
+            src = $rootScope.rootPath + "/static/img/product/releaseByBatch-usd.png";
+        }
+        var box = $('#image-box');
+        box.find('img').attr('src', src);
+        box.find('a').click(function(){
+            box.hide();
+        });
+        box.dblclick(function(){
+            box.hide();
+        });
+        box.show();
+    };
+
+    //获取登录的信息
+    var getAuthentication = function () {
+        return AuthenticationService.getAuthentication().success(function(data) {
+            if(data && data.enterprises) {
+                data.enterprise = data.enterprises[data.enterprises.length - 1];
+                if(data.enterprises.length > 1) {
+                    var enSelect = [];
+                    angular.forEach(data.enterprises, function(e){
+                        if(e.current)
+                            data.enterprise = e;
+                        else
+                            enSelect.push(e);
+                    });
+                    data.enSelect = enSelect;
+                }
+            }
+            $rootScope.userInfo = data;
+        }).error(function(response) {
+            toaster.pop('info', '获取定单的信息' + response);
+        });
+    };
+
+    //判断是否是商城管理公司,是否可以选择自营。
+    $q.all([getAuthentication()]).then(function() {
+        //获取店铺的信息
+        StoreInfo.getStoreInfoByEnuu({enUU : $rootScope.userInfo.enterprise.uu}, function(data) {
+            $scope.storeInfo = data;
+            if(!data.uuid || data.storeName.indexOf('优软测试二') > -1 || data.storeName.indexOf('优软商城') > -1) {
+                $scope.batch.sellType = 'UAS';
+                $scope.batch.selfSellEabled = false;
+            }else {
+                $scope.batch.sellType = 'self';
+                $scope.batch.selfSellEabled = true;
+            }
+        }, function(response) {
+            toaster.pop('error', '获取店铺的信息失败, ' + response.data);
+        });
+    });
+
+    // 返回店铺的uuid,未开店则返回寄售uuid
+    $q.all([getAuthentication()]).then(function() {
+        //获取店铺的信息
+        StoreInfo.getUuidByEnuu({enUU : $rootScope.userInfo.enterprise.uu}, function(data) {
+            $scope.storeUuid = data.data;
+        }, function(response) {
+            toaster.pop('error', '获取店铺的信息失败, ' + response.data);
+        });
+    });
+
+
+    //选择文件
+    $scope.selectFile = function(value) {
+        if(value != null) {
+            upload_text.value = value;
+        }else {
+            var fileInput = angular.element('#uploadCommodity')[0];
+            upload_text.value = fileInput.value;
+        }
+    };
+    // 是否是pcb
+    // $scope.isPcbStore =  $rootScope.isPcbStore
+		// 上传Excel批量发布(大量)
+		$scope.upload = function() {
+			if(($scope.batch.myFiles == null) || ($scope.batch.myFiles.length == 0)) {
+				return ;
+			}
+			var file = $scope.batch.myFiles[0];
+			if(!file) {
+				toaster.pop('info', '请选择需要上传的文件');
+				return;
+			}
+			if ($rootScope.$$productOn.tab === 'bathOnPerson') {
+				var param = {selfSale : $scope.batch.sellType == 'self', currency : $scope.batch.currency, isPerson : 1};
+			} else {
+                var param = {selfSale : $scope.batch.sellType == 'self', currency : $scope.batch.currency, ignoreImport : $scope.ignoreImport};
+			}
+
+			var uploadUrl = '/trade/purchaseProduct/personal/release/excel';
+			// var uploadUrl = $rootScope.isPcbStore ? 'release/product/release/excel/pcb' : 'release/product/release/excel';
+			// 上传文件进度条
+			// $scope.uploadProgressText = ''
+      $scope.showCanvas = false
+			$upload.upload({
+				url: uploadUrl,
+				file: file,
+				method: 'POST',
+				params : param
+			}).progress(function(evt) {
+			  clearInterval($scope.AnimationCanvas)
+        $scope.showCanvas = true
+        var progressPercentage = parseInt(100.0 * evt.loaded / evt.total);
+        drawFrame(progressPercentage)
+        // $scope.uploadProgressText = progressPercentage + '%'
+        // console.log('progess:' + progressPercentage + '%' + evt.config.file.name);
+      }).success(function(data) {
+				$scope.selectFile(' ');
+				$scope.batch.myFiles = [];
+				$scope.proInfo = data.info;
+				$scope.result = data;
+				$scope.hadImport = false;
+				// var message = "";
+				// if($scope.result.success) {
+				// 	message = '标准产品' + $scope.result.success + '个';
+				// }
+				// if($scope.result.failure) {
+				// 	if(message) {
+				// 		message = message + ',非标产品' + $scope.result.failure +  '个';
+				// 	}else {
+				// 		message = '非标产品' + $scope.result.failure +  '个';
+				// 	}
+				// }
+				// if($scope.result.filter) {
+				// 	if(message) {
+				// 		message = message + ',过滤' + $scope.result.filter +  '条';
+				// 	}else {
+				// 		message = '过滤' + $scope.result.filter +  '条';
+				// 	}
+				// }
+				// if(!message) {
+				// 	message = '没有提交任何信息'
+				// }
+        if ($scope.result.filter && $scope.result.filter > 0) {
+            toaster.pop('warning', '警告', '存在导入失败产品,可下载导入失败表格查看详情');
+        } else {
+            toaster.pop('success', '提示', '上传完成');
+        }
+        $scope.showCanvas = false
+				$scope.relTableParams.page(1);
+				$scope.relTableParams.reload();
+        if ($rootScope.$$productOn.tab === 'bathOnPerson') {
+            publicPersonProduct();
+        }
+        }).error(function(response) {
+            $scope.result = {};
+            $scope.result.total = 0;
+            $scope.pageParams.number = 0;
+            $scope.pageParams.content = null;
+            $scope.pageParams.totalElements = 0;
+            $scope.pageParams.totalPages = 0;
+            toaster.pop('error', response.data || response);
+            $scope.showCanvas = false
+        })
+    };
+
+    // 下载模板
+    $scope.download = function () {
+        var downloadUrl = '/trade/purchaseProduct/release/template'
+        window.location.href = $rootScope.rootPath + downloadUrl
+    };
+    // $scope.download = function() {
+    //     var show = SessionService.get($scope.userInfo.userUU + "-releasetip");
+    //     var downloadUrl = $rootScope.isPcbStore ? '/release/product/release/template/pcb' : '/release/product/release/template'
+    //     if (!show) {
+    //         var modalInstance = $modal.open({
+    //             animation: true,
+    //             templateUrl : $rootScope.rootPath + '/static/view/vendor/modal/releaseProductByBatchTip.html',
+    //             controller : 'releaseProductByBatchTipCtrl'
+    //         });
+    //         modalInstance.result.then(function(response) {
+    //         }, function(res) {
+    //             window.location.href = $rootScope.rootPath + downloadUrl + '?currency=' + $scope.batch.currency + ($rootScope.$$productOn.tab == 'bathOnPerson' ? '&isPerson=1' : '');
+    //         });
+    //     } else {
+    //         window.location.href = $rootScope.rootPath + downloadUrl + '?currency=' + $scope.batch.currency + ($rootScope.$$productOn.tab == 'bathOnPerson' ? '&isPerson=1' : '');
+    //     }
+    // };
+
+    var afterPublish = function () {
+        speed = 100
+        clearInterval($scope.AnimationCanvas)
+        $scope.showCanvas = false
+        $modal.open({
+            animation : true,
+            templateUrl : 'static/view/common/modal/product_upload_modal.html',
+            controller : 'rule_tip_ctrl',
+            resolve : {
+                type : function() {
+                    return 'upload';
+                },
+                tipModal : function() {
+                    return true;
+                },
+                success : function () {
+                    return $scope.needShowTip;
+                },
+                uuid: function () {
+                    return $scope.storeUuid;
+                }
+            }
+        });
+        $scope.relTableParams.page(1);
+        $scope.relTableParams.reload();
+        $scope.result.success = 0;//设置成0,让前端用户不能点击
+        $scope.hadImport = true; //上架后隐藏提示语
+    }
+    //批量发布
+    $scope.publish = function(event) {
+        if ($scope.pageParams.totalElements > 0) {
+            speed = 1
+            $scope.showCanvas = true
+            $scope.AnimationCanvas = setInterval(function () {
+              if (speed > 100) clearInterval($scope.AnimationCanvas)
+              if (speed >= 98) clearInterval($scope.AnimationCanvas)
+              else {
+                speed += RandomNumber();
+                drawFrame(speed)
+              }
+            }, 30)
+          if ($rootScope.isPcbStore) {
+              ReleaseProductByBatch.batchReleasePcb({batch : $scope.result.batch}, null, function(data) {
+                  afterPublish();
+              }, function(res) {
+                  toaster.pop("error", "发布失败", res.data);
+                  clearInterval($scope.AnimationCanvas)
+                  $scope.showCanvas = false
+              });
+          } else {
+              ReleaseProductByBatch.batchRelease({batch : $scope.result.batch}, null, function(data) {
+                  afterPublish();
+              }, function(res) {
+                  toaster.pop("error", "发布失败", res.data);
+                  clearInterval($scope.AnimationCanvas)
+                  $scope.showCanvas = false
+              });
+          }
+        } else {
+            event.stopPropagation();//阻止冒泡事件
+            event.preventDefault();//阻止默认的事件。
+            toaster.pop("info", "提示", "没有信息发布");
+        }
+    };
+
+    function publicPersonProduct() {
+        speed = 1
+        $scope.showCanvas = true
+        $scope.AnimationCanvas = setInterval(function () {
+          if (speed > 100) clearInterval($scope.AnimationCanvas)
+          if (speed >= 98) clearInterval($scope.AnimationCanvas)
+          else {
+            speed += RandomNumber();
+            drawFrame(speed)
+          }
+        }, 30)
+        ReleaseProductByBatch.batchReleasePerson({batch : $scope.result.batch}, null, function(data) {
+          speed = 100
+          clearInterval($scope.AnimationCanvas)
+          $scope.showCanvas = false
+            if ($scope.needShowTip && $rootScope.$$productOn.tab !== 'bathOnPerson') {
+                $scope.relTableParams.page(1);
+                $scope.relTableParams.reload();
+                //$scope.result.success = 0;//设置成0,让前端用户不能点击
+                $modal.open({
+                    animation : true,
+                    templateUrl : 'static/view/common/modal/product_upload_modal.html',
+                    controller : 'rule_tip_ctrl',
+                    resolve : {
+                        type : function() {
+                            return 'upload';
+                        },
+                        tipModal : function() {
+                            return true;
+                        },
+                        success : function () {
+                            return false;
+                        },
+                        uuid: function () {
+                            return null;
+                        }
+                    }
+                });
+                return ;
+            }
+            // toaster.pop("success", "提示", "发布成功 :" + data.data + "条");
+            $scope.personMedol = true;
+            $scope.relTableParams.page(1);
+            $scope.relTableParams.reload();
+            //$scope.result.success = 0;//设置成0,让前端用户不能点击
+            /*$scope.hadImport = true; //上架后隐藏提示语*/ // 个人上传不隐藏
+        }, function(res) {
+            toaster.pop("error", "发布失败", res.data);
+        });
+    }
+
+    //下载未匹配成功的数据
+    $scope.downloadExcel = function(){
+        if ($rootScope.$$productOn.tab === 'bathOnPerson') {
+            var datatem = {isAjax : true, batch : $scope.result.batch, isPerson : 1};
+        } else {
+            var datatem = {isAjax : true, batch : $scope.result.batch};
+        }
+        var downloadFailureUrl = '/trade/purchaseProduct/release/failure/xls';
+        // var downloadFailureUrl = $rootScope.isPcbStore ? 'release/product/release/failure/pcb/xls' : 'release/product/release/failure/xls';
+        if($scope.result && $scope.result.batch && $scope.result.filter) {
+            var form = document.getElementById('load-error');
+            form.action= downloadFailureUrl;
+            form.submit();
+            Loading.show();
+            var intervalId = null;
+            var getDownLoadStatus = function () {
+                $.ajax({
+                    type: 'GET',
+                    url: downloadFailureUrl,
+                    data : datatem,
+                    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.result || !$scope.result.batch) {
+                toaster.pop('info', '提示', '您没有上传信息');
+            }else if(!$scope.result.filter) {
+                toaster.pop('info', '提示', '您没有匹配不成功的数据');
+            }
+        }
+    };
+
+    var RandomNumber = function() {
+      return Math.random()
+    }
+    /**
+     * 创建canvas环境*/
+    var canvas = document.getElementById('canvas'), // 获取canvas元素
+        context = canvas.getContext('2d'), // 设置画图环境
+        contextX = canvas.width / 2, // 获取canvas中心点X轴坐标
+        contextY = canvas.height / 2,  // 获取canvas中心点Y轴坐标
+        rad = Math.PI * 2 / 100, // //将360度分成100份,那么每一份就是rad度
+        speed = 1, // 当前数值
+        speed_step = 0.3; // 加载速度
+    //绘制5像素宽的运动外圈
+    function blueCircle(n) {
+      context.save(); // 保存状态
+      // context.strokeStyle = '#fff'; //设置描边样式
+      context.beginPath();//路径开始
+      context.lineWidth = 3; //设置线宽
+      context.arc(contextX, contextY, 45, -Math.PI / 2, -Math.PI / 2 + n * rad, false);
+
+      // 渐变色 - 可自定义
+      var linGrad = context.createLinearGradient(
+          contextX-100-3, contextY, contextX+100+3, contextY
+      );
+      linGrad.addColorStop(0.0, '#45b1fc');
+      linGrad.addColorStop(1.0, '#dbdbdb');
+      context.strokeStyle = linGrad;
+      context.lineCap = 'round';
+      // 用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
+      context.stroke();//绘制
+      context.closePath();//路径结束
+      context.restore();// 获取保存的状态
+    }
+    //绘制3像素宽的背景白色外圈
+    function whiteCirecle() {
+      context.save();
+      context.beginPath();
+      context.lineWidth = 3; //设置线宽
+      context.lineCap = "round";
+      // context.strokeStyle = '#dbdbdb';
+      context.strokeStyle = "#dbdbdb"
+      context.arc(contextX, contextY, 45, 0, Math.PI*2, false);
+      context.stroke();
+      context.closePath();
+      context.restore();
+    }
+    function text(n) {
+      context.save();
+      context.fillStyle = '#49b2fb';
+      var font_size = 20;
+      context.font = font_size + 'px Arial';
+      var text_width = context.measureText(n.toFixed(0)+"%").width;
+      context.fillText(n.toFixed(0) + "%", contextX - text_width/2, contextY + font_size / 2);
+      context.restore()
+    }
+
+    function drawFrame(speed) {
+      context.clearRect(0, 0, canvas.width, canvas.height);
+      whiteCirecle()
+      text(speed)
+      blueCircle(speed)
+    }
+    // (function drawFrame2(){
+    //   window.requestAnimationFrame(drawFrame2);
+    //   if(speed > 100) speed = 0;
+    //   speed += 0.1;
+    //   drawFrame(speed)
+    // }());
+	}]);
+
+	//批量上架的Ctrl
+	app.register.controller('batchPutOnCtrl', ['$scope', '$rootScope', 'ngTableParams', '$upload', '$q', 'AuthenticationService', 'BaseService', 'StoreInfo', 'SessionService', '$modal', 'toaster', 'ReleaseProductByBatch', 'Loading', 'Enterprise', 'DistributionRule', function ($scope, $rootScope, ngTableParams, $upload, $q, AuthenticationService, BaseService, StoreInfo, SessionService, $modal, toaster, ReleaseProductByBatch, Loading, Enterprise, DistributionRule) {
+
+
+	}]);
+
+	//下载表格时显示提示信息
+	app.register.controller('releaseProductByBatchTipCtrl', ['$scope', '$modalInstance', 'SessionService', function($scope, $modalInstance, SessionService) {
+		$scope.IKnow = function() {
+			$modalInstance.dismiss();
+		};
+
+		$scope.donShowAgain = function() {
+			var show = SessionService.set($scope.userInfo.userUU + "-releasetip", 1);
+			$modalInstance.dismiss();
+		};
+	}]);
+
+	app.register.controller('product_delete_ctrl', ['$scope', 'id', 'toaster', '$modalInstance', 'ReleaseProductByBatch', function ($scope, id, toaster, $modalInstance, ReleaseProductByBatch) {
+		$scope.deleteModal = true;
+
+		$scope.cancleDelete = function () {
+			$scope.deleteModal = false;
+			$modalInstance.dismiss();
+		};
+
+		$scope.confirmDelete = function () {
+			//删除指定id的信息
+			if(!id || id == '') {
+				return ;
+			}
+			ReleaseProductByBatch.deleteProInfo({id : id}, function (data) {
+				if (data){
+					$scope.deleteModal = false;
+					$modalInstance.close();
+				}
+			}, function (error) {
+				toaster.pop('error', '删除失败,请重新操作');
+			});
+		};
+
+		/**
+		 * 监听点击的事件
+		 */
+		document.onclick = function (event) {
+			if($scope.deleteModal) {
+				if(event) {
+					var tag = event.target;
+					if(tag) {
+						var attribute = tag.getAttribute("name");
+						while(tag.nodeName != 'BODY') {
+							if((attribute == 'comfirm-delete-modal') ||
+								attribute == 'delete-material') {
+								return ;
+							}
+							tag = tag.parentElement;
+							attribute = tag.getAttribute("name");
+						}
+						$scope.deleteModal = false;
+						$modalInstance.dismiss();
+					}
+				}
+			}
+		};
+	}]);
+});

+ 3 - 3
src/main/webapp/resources/js/vendor/app.js

@@ -489,7 +489,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 		})).state('vendor_productOn', angularAMD.route({
 			title : '产品导入',
 			url : '/vendor_productOn',
-			// templateUrl : 'static/view/vendor/forstore/vendor_upload.html',
+			// templateUrl : 'static/view/vendor/forstore/product_upload.html',
 			// controllerUrl : "app/controllers/forstore/vendor_upload_ctrl",
 			// controller : 'vendorUploadCtrl'
 			// templateUrl : 'static/view/vendor/forstore/vendor_productOn.html',
@@ -499,7 +499,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 		})).state('product_repository', angularAMD.route({
 			title : '产品库',
 			url : '/product_repository',
-			// templateUrl : 'static/view/vendor/forstore/vendor_upload.html',
+			// templateUrl : 'static/view/vendor/forstore/product_upload.html',
 			// controllerUrl : "app/controllers/forstore/vendor_upload_ctrl",
 			// controller : 'vendorUploadCtrl'
 			templateUrl : 'static/view/vendor/forstore/vendor_proRepository.html',
@@ -508,7 +508,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 		})).state('vendor_upload', angularAMD.route({
 			title : '标准上架',
 			url : '/vendor_upload',
-			templateUrl : 'static/view/vendor/forstore/vendor_upload.html',
+			templateUrl : 'static/view/vendor/forstore/product_upload.html',
 			controllerUrl : "app/controllers/forstore/vendor_upload_ctrl",
 			controller : 'vendorUploadCtrl'
 		})).state('vendor_repository', angularAMD.route({

+ 823 - 0
src/main/webapp/resources/view/usercenter/forstore/product_upload.html

@@ -0,0 +1,823 @@
+<!--右侧主体部分-->
+<style>
+    .tab.active {
+        display: inline-block !important;
+    }
+    *{-webkit-box-sizing: border-box;  -moz-box-sizing: border-box;  box-sizing: border-box;}
+    div.wanted_list01 dt.paging-bar>span {
+        float: right;
+        width: 322px;
+        height: 40px;
+        font-weight: normal;
+    }
+    div.wanted_list01 dt.paging-bar>span button.paging-button {
+        padding: 0;
+        height: 40px;
+        line-height: 40px;
+        border: none;
+        background: #FFFFFF;
+    }
+    div.wanted_list01 dt.paging-bar>span button.paging-button:hover {
+        color: #0C3894;
+    }
+    div.wanted_list01 dt.paging-bar>span input.page-num {
+        width: 25px;
+        height: 25px;
+        line-height: 40px;
+        border: 1px #C7BEBE solid;
+        text-align: center;
+    }
+    label[disabled] {
+        cursor: not-allowed;
+    }
+    .com_tab ul li.down-goods span:hover {
+        cursor: pointer;
+        text-decoration: underline;
+    }
+    .materrial-list span.length01{
+        width: 10% !important;
+    }
+    .materrial-list span{
+        width: 20% !important;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    ul.pagination.ng-table-pagination > li > a > span {
+        height: 17px;
+        line-height: 17px;
+    }
+
+    div.ng-table-pager  input.page-number {
+        vertical-align: inherit;
+        display: inline-block;
+        width: 40px;
+        height: 31px;
+        padding: 6px 6px;
+        font-size: 14px;
+        line-height: 1.42857143;
+        color: #9B9792;
+        text-align: center;
+        background-color: #F6F5F4;
+        background-image: none;
+        border: 1px solid #ccc;
+        border-top-left-radius: 4px;
+        border-bottom-left-radius: 4px;
+        box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+        transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+    }
+
+    div.ng-table-pager a.page-a {
+        color: #fff;
+        cursor: pointer;
+        background-color: #4574E8;
+        border-color: #4574E8;
+        padding: 6px 6px;
+        font-size: 14px;
+        border-top-right-radius: 4px;
+        border-bottom-right-radius: 4px;
+        text-decoration: none;
+        height: 31px;
+    }
+    .ng-table-pagination .page-a:hover {
+        border: 1px solid #5078cb !important;
+        background: #5078cb !important;
+        color: #fff !important;
+    }
+
+    div.ng-table-pager div.page-go-block {
+        float: right;
+        margin-left: 20px;
+        margin-top: 20px;
+        font-size: 0px;
+        height: 31px;
+        line-height: 31px;
+    }
+
+    .load_next .add_category div {
+        width: 100%;
+        min-height: 50px;
+        line-height: 50px;
+        font-size: 14px;
+    }
+
+    .publish {
+        background: #ecf2fd;
+        width: 128px;
+        height: 40px;
+        display: inline-block;
+        text-align: center;
+        color: #5078cb;
+        line-height: 40px;
+        font-size: 14px;
+        cursor: pointer;
+    }
+    .publish[disabled] {
+        cursor: not-allowed;
+    }
+    .publish span {
+        color: #fff;
+    }
+
+    .batch-commodity {
+        border-bottom: #cfcfcf 1px dashed;
+    }
+
+    thead tr.title {
+        background: #f7f7f7;
+        height: 35px !important;
+        line-height: 35px;
+    }
+
+    .add_category .sale-label label input[type="radio"]:checked + label {
+        background-position: -19px -1px;
+    }
+    .add_category .sale-label label span{
+        font-weight: normal;
+        margin-right: 15px;
+    }
+    .add_category .sale-label label input[type="radio"]:checked + label +span{
+        color: #5078cb;
+    }
+    .add_category .sale-label label label {
+        width: 16px;
+        height: 16px;
+        background: url(static/img/user/images/radio.png);
+        background-position: 0 -1px;
+        margin-right: 2px;
+        vertical-align: middle;
+    }
+    .add_category .sale-label input[type="radio"] {
+        display: none;
+    }
+    .add_category .sale-label span {
+        cursor: pointer;
+    }
+    .add_category .sale-label span:first-child {
+        margin-right: 15px;
+    }
+    .add_category .sale-label span[disabled] {
+        cursor: not-allowed;
+    }
+    .user_right a.blue-bg{
+        color: #fff !important;
+        margin-top: 5px;
+    }
+    .user_right a.blue-bg:hover{
+        background: #3f7ae3 !important;
+    }
+    .public-tab.table>thead>tr>th,.public-tab.table>tbody>tr>td{
+        text-align: left;
+    }
+    .public-tab.table>thead>tr>th{
+        background: #dff3fd;
+    }
+    .public-tab.table>tbody>tr>td{
+        /*border-bottom: #cfcfcf 1px dashed;*/
+        white-space: normal;
+        background: #f0fafe;
+    }
+    .public-tab.table>tbody>tr td{
+        border-top: #cfcfcf 1px dashed;
+        border-bottom: none;
+    }
+    .public-tab.table>tbody>tr:first-child td{
+        border-top: none;
+    }
+    .public-tab.table>thead>tr>th:first-child,.public-tab.table>thead>tr>th:last-child,.public-tab.table>tbody>tr>td:first-child,.public-tab.table>tbody>tr>td:last-child{
+        text-align: center;
+    }
+    .public-tab.table>tbody>tr>td div{
+        min-height: inherit;
+        line-height: 25px;
+        margin-bottom: 1px;
+    }
+    .public-tab.table{
+        margin-top: 15px;
+    }
+    .load_next .add_category .upload i{
+        top: 6px;
+    }
+    .public-tab.table>tbody>tr>td em{
+        color: #333 !important;
+    }
+    .upload-content{
+        width: 570px !important;
+        float: left;
+    }
+    .user_right .upload .check{
+        width: auto;
+        font-size: 14px;
+        line-height: 35px;
+    }
+    .user_right .upload .check a{
+        font-size: 14px;
+        margin-right: 20px;
+        background: none;
+        color: #333;
+        width: auto;
+    }
+    .user_right .upload .check a:hover{
+        color: #5078cb !important;
+        background: none;
+    }
+    .user_right .upload .check .check-active{
+        margin-right: 15px;
+    }
+    .user_right .upload .check .check-active span{
+        font-weight: normal;
+        color: #333;
+    }
+    .user_right .upload .check  .check-active 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;
+        margin-right: 5px !important;
+        min-height: 15px !important;
+        left: 0 !important;
+    }
+    .user_right .upload .check .check-active input[type="checkbox"]:checked + label {
+        background-position: -15px 0;
+    }
+    .user_right .upload .check .check-active input[type="checkbox"]:checked + label + span{
+        color: #5078cb;
+    }
+    .load_next .add_category .upload{
+        margin-top: 1px;
+    }
+    .load_next .add_category .upload #upload_text{
+        top: -1px;
+        position: relative;
+    }
+    .load_next .add_category .upload01{
+        top: 6px;
+    }
+
+    label.sellType:hover {
+        cursor: pointer;
+    }
+    .open-icon{
+        display: inline-block;
+        width: 22px;
+        height: 12px;
+        background: url("static/img/icon/open.png") no-repeat center;
+        margin-top: 37px;
+        transform: rotate(-180deg);
+        float: right;
+        vertical-align: middle;
+        cursor: pointer;
+    }
+    .open-icon.active{
+        transform: rotate(0);
+    }
+    .device .load_next.border-none,.device .load_next p.border-none{
+        border-bottom: none;
+    }
+    .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: 2px;
+        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;
+    }
+    .public-tab.table tr td div.text-more em{
+        margin: 0 !important;
+    }
+    .public-tab.table>tbody>tr.record-number{
+        height: 30px;
+    }
+    .public-tab.table>tbody>tr.record-number td{
+        border: none;
+        background: none;
+        padding: 0;
+        border-bottom: #cfcfcf 1px dashed;
+        border-top: #cfcfcf 1px solid;
+    }
+    .public-tab.table>tbody>tr.record-number td div{
+        text-align: right;
+        padding-right: 25px;
+        font-size: 12px;
+    }
+    .public-tab.table>tbody>tr>td{
+        padding-top: 15px;
+        padding-bottom: 15px;
+    }
+    /*产品导入增加文案提示*/
+    .load_next .add_category .txt-info{
+        margin-top: 43px;
+        padding-left: 10px;
+        width: 100%;
+        height: 30px;
+        line-height: 30px;
+        min-height: 0;
+        text-align: left;
+        font-size: 14px;
+        color: #333;
+        background: #fef6f2;
+        border: 1px solid #ec854d;
+    }
+    .load_next .add_category .txt-info span{
+        font-size: 14px;
+        color: #f10707;
+    }
+    .load_next .add_category .txt-info b.success-hidden{
+        font-size: 14px;
+        color: #333;
+        font-weight: normal ;
+    }
+    .load_next .add_category .txt-info a{
+        font-size: 14px;
+        color: #5078cb;
+    }
+    .wanted_list01 .tab table{
+        margin-top: 0;
+    }
+    /*防误删弹出框*/
+    .modal{
+        bottom: unset!important ;
+    }
+    .modal-content{
+        -webkit-box-shadow: none;
+        box-shadow: none;
+    }
+    /*.com-del-box{
+        box-shadow: none;
+    }*/
+    .com-del-box .title i.fa-close{
+        font-size: 16px;
+    }
+    .com-del-box p {
+        height: 46px;
+        line-height: 46px;
+        text-align: center;
+        color: #5078cb;
+    }
+    .com-del-box {
+        width: 324px;
+        height: auto;
+        -webkit-box-shadow: none;
+        -moz-box-shadow: none;
+        box-shadow: none;
+        border-radius: 3px;
+    }
+    .com-del-box p img {
+        margin: 0 5px 2px 0;
+    }
+    .com-del-box .result {
+        width: 224px;
+        margin: 0 auto;
+        font-size: 13px;
+    }
+    .com-del-box .result span {
+        color: #f40d0d;
+    }
+    .com-del-box .result a {
+        color: #5078cb;
+    }
+    .com-del-box .operate {
+        margin-top: 22px;
+        text-align: center;
+        font-size: 12px;
+        margin-bottom: 18px;
+    }
+    .com-del-box .operate span {
+        display: inline-block;
+        width: 82px;
+        height: 22px;
+        line-height: 22px;
+        background: #5078cb;
+        color: #fff;
+        border-radius: 2px;
+        margin-right: 9px;
+        cursor: pointer;
+    }
+    .com-del-box .operate a {
+        color: #5078cb;
+    }
+    .type-remind-box {
+        width: 289px;
+        height: 132px;
+        -webkit-box-shadow: none;
+        -moz-box-shadow: none;
+        box-shadow: none;
+    }
+    .type-remind-box .title {
+        height: 23px;
+        line-height: 23px;
+    }
+    .type-remind-box .result {
+        width: 239px;
+        height: 37px;
+        margin: 16px auto 18px;
+        font-size: 14px;
+        color: #666;
+        line-height: 20px;
+    }
+    .type-remind-box .result span {
+        color: #e83825;
+    }
+    .type-remind-box .operate {
+        text-align: center;
+    }
+    .type-remind-box .operate a {
+        display: inline-block;
+        width: 90px;
+        height: 28px;
+        line-height: 28px;
+        text-align: center;
+        background: #5078cb;
+        color: #fff;
+        font-size: 14px;
+        vertical-align: middle;
+    }
+    .type-remind-box .operate a:first-child {
+        margin-right: 10px;
+    }
+    .type-remind-box .operate a:last-child {
+        background: #fff;
+        color: #5078cb;
+        border: 1px solid #5078cb;
+    }
+    .type-remind-box .operate a:first-child:hover {
+        color: #fff !important;
+    }
+    .type-remind-box .operate a:last-child:hover{
+        border-bottom: 1px solid #5078cb !important;
+        color: #5078cb !important;
+    }
+    .remind-line{
+        width: 100%;
+        line-height: 30px;
+        text-align: center;
+        background: #fef6f2;
+        border: 1px solid #ec854d;
+        overflow: hidden ;
+    }
+    .remind-line span{
+        width: 660px;
+        word-break: break-all;
+        display: inline-block;
+        margin-left: 190px;
+        text-align: left;
+        font-size: 14px;
+        color: #f15601;
+    }
+    .remind-line a.fr{
+        padding-right: 10px;
+        font-size: 20px;
+        font-weight: bold;
+        color: #ef1d1d;
+    }
+    .remind-line .operate-introduce {
+        font-size: 14px;
+        color: #5078cb;
+    }
+    .device .wanted_list01 .pagination > li > a:hover {
+        border-bottom: 1px solid #ddd !important;
+        z-index: 0;
+    }
+    .device .wanted_list01 .pagination > li.active:hover > a {
+        border: 1px solid #337ab7 !important;
+        border-bottom: none !important;
+    }
+    .com_tab ul li{
+        margin-left: 0px;
+        position: relative;
+    }
+    .com_tab ul li.active a{
+        border-bottom: #fff;
+        background: #5078cb;
+        color: #fff;
+    }
+    .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;
+    }
+    .com_tab ul li.active:after{
+        display: block
+    }
+    /*上架30分钟提示*/
+    .device .load_next .tip {
+        margin-left: 15px;
+        font-size: 14px;
+        color: #f60e0e;
+    }
+</style>
+<div class="user_right fr">
+    <!--货品管理-->
+    <div class="pro_management device">
+        <div class="com_tab">
+            <ul class="fl" style="width: 100%" ng-if="!isPcbStore">
+                <li ng-class="{'active': $$productOn.tab == 'bathOnPerson'}"><a>导入产品</a></li>
+                <!--<li ng-class="{'active': $$productOn.tab == 'bathOn'}" ng-click="toggleActive('bathOn')"><a href="">导入产品并上架</a></li>-->
+                <!--<li ng-class="{'active': $$productOn.tab == 'bathOnPerson'}" ng-click="toggleActive('bathOnPerson')"><a href="">导入产品</a></li>-->
+            </ul>
+            <ul class="fl" style="width: 100%" ng-if="isPcbStore">
+                <!--<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 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>
+                <li class="active"><a ui-sref="vendor_upload">产品导入</a></li>
+            </ul>
+        </div>
+        <div class="remind-line" ng-show="$$productOn.tab == 'bathOn' && showTip"><span class="fl">导入企业库的产品同时会进行上架销售并展示在店铺</span><a ng-click="closeTip()" class="fr">&times;</a></div>
+        <!--<div class="remind-line" ng-show="$$productOn.tab == 'bathOnPerson' && showTip">-->
+            <!--<span class="fl">-->
+                <!--1、导入产品物料,可让您被搜索到且能获取相关产品的询价商机。<br/>-->
+                <!--2、由于导入产品物料无须填写库存、交期、价格等信息,买家不能立即购买。<br/>-->
+                <!--3、如希望立即购买请进行“导入产品并上架”操作,或“导入物料”后在“库存管理”里完成上架。-->
+            <!--</span>-->
+            <!--<a href="help/helpDetail/56" target="_blank" class="operate-introduce">操作说明</a><a ng-click="closeTip()" class="fr">&times;</a></div>-->
+        <div class="wanted_list01">
+            <div class="tab" ng-if="$$productOn.leadIn == 'bathOn'" ng-class="{'active': leadIn == 'bathOn'}" >
+                <div class="load_next" ng-class="{'border-none':open01}">
+                    <p>第一步,下载Excel模板
+                        <em class="open-icon" ng-click="open01=!open01" ng-class="{'active': !open01}"></em>
+                    </p>
+                    <div class="add_category" ng-if="!open01">
+                        <div>下载产品导入Excel模板,在模板上编辑商品信息
+                            <!--<a ng-click="showImg()" style="color: #e64040">查看表格示例</a>-->
+                        </div>
+                        <div class="load_tab" style="margin-top: 2px;"><a href="javascript:void(0)" ng-click="download()" class="blue-bg">下载产品导入模板</a></div>
+                    </div>
+                </div>
+                <div class="load_next" ng-class="{'border-none':open02}">
+                    <p>第二步,上传产品导入表格
+                        <em class="open-icon" ng-click="open02=!open02" ng-class="{'active': !open02}"></em>
+                    </p>
+                    <div class="add_category" ng-if="!open02">
+                        <div ng-if="$$productOn.tab == 'bathOn'">1、请选择销售方式:</div>
+                        <div class="sale-label" style="margin-top: -10px;" ng-if="$$productOn.tab == 'bathOn'">
+                           <!-- <label class="sellType">
+                                <input ng-click="sellType('UAS')" type="radio" name="487" id="sellbyUAS" ng-model="batch.sellType" ng-checked="batch.sellType == 'UAS'">
+                                <label for="sellbyUAS"></label>
+                                <span>优软代售</span>
+                            </label>
+                            <label class="sellType" ng-disabled="!batch.selfSellEabled">
+                                <input ng-click="sellType('self')" type="radio" name="487" id="sellbyself" ng-model="batch.sellType" ng-checked="batch.sellType == 'self'">
+                                <label for="sellbyself" ng-disabled="!batch.selfSellEabled"></label>
+                                <span ng-disabled="!batch.selfSellEabled">店铺自营</span>
+                            </label>-->
+                            <span ng-disabled="isPcbStore">
+                                <img ng-show="batch.sellType == 'self'" src="static/img/upload/daishou-default.png" alt="" ng-click="sellType('UAS')">
+                                <img ng-hide="batch.sellType == 'self'" src="static/img/upload/daishou-active.png" alt="">
+                            </span>
+                            <span ng-disabled="!batch.selfSellEabled">
+                                <img ng-show="batch.sellType == 'UAS'" src="static/img/upload/ziying-default.png" alt="" ng-click="sellType('self')">
+                                <img ng-hide="batch.sellType == 'UAS'" src="static/img/upload/ziying-active.png" alt="">
+                            </span>
+                        </div>
+                        <div ng-if="$$productOn.tab == 'bathOn'">2、若存在属性完全相同但价格不一致的产品:</div>
+                        <div class="sale-label" style="margin-top: -10px;" ng-if="$$productOn.tab == 'bathOn'">
+                            <label class="sellType">
+                                <input type="radio" name="import" id="forIgnore" ng-model="ignoreImport" value="1" ng-click="switchImport(1)">
+                                <label for="forIgnore"></label>
+                                <span>忽略不导入</span>
+                            </label>
+                            <label class="sellType">
+                                <input type="radio" name="import" id="forImport" ng-model="ignoreImport" value="0" ng-click="switchImport(0)">
+                                <label for="forImport"></label>
+                                <span>导入并覆盖</span>
+                            </label>
+                        </div>
+                        <div><span ng-if="$$productOn.tab == 'bathOn'">3、</span>请上传已经编辑好的库存表格,选择好上传的文件之后,点击确认上传</div>
+                        <div class="upload">
+                            <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="batch.myFiles" ng-multiple="false" class="upload01" />
+                                <a href="javascript:void(0)" ng-click="upload()" ng-disabled="!batch.myFiles[0]" class="blue-bg" style="margin-left: 18px;">确认上传</a>
+                            </div>
+                            <!--批量删除操作-->
+                           <!-- <div class="check fr">
+                                <a  ng-click="">批量操作</a>
+                                <span class="check-btn">
+                                    <label class="check-active">
+                                        <input type="checkbox" id="AllChoose"/>
+                                        <label for="AllChoose"></label>
+                                        <span>全选</span>
+                                    </label>
+                                    <a href="#">删除</a>
+                                    <a href="#">取消</a>
+                                    <a href="#">确定</a>
+                                </span>
+                            </div>-->
+                        </div>
+                        <div class="txt-info" ng-if="result && result.total != 0 && !hadImport && $$productOn.tab != 'bathOnPerson'">成功导入 <span ng-bind="result.success + result.failure">600</span> 个产品(其中标准产品 <span ng-bind="result.success">200</span> 个,非标产品 <span ng-bind="result.failure">400</span> 个)<b class="success-hidden" ng-if="result.filter != 0">,下载 <a ng-click="downloadExcel()">导入失败产品</a></b></div>
+                        <div ng-show="$$productOn.tab == 'bathOn' && isPcbStore">
+                            <table ng-table="relTableParams" class="public-tab table">
+                                <thead>
+                                <tr>
+                                    <th width="60">序号</th>
+                                    <th width="150" style="padding-left: 10px;">器件属性</th>
+                                    <th width="180">产品固有属性</th>
+                                    <th width="200">产品自定义属性</th>
+                                    <th width="100">梯度/pcs</th>
+                                    <th width="100">单价(<em ng-bind="batch.currency == 'RMB' ? '¥' : '$'"></em>)</th>
+                                    <th width="70">操作</th>
+                                </tr>
+                                </thead>
+                                <tbody>
+                                <tr ng-repeat="batchCommodity in pageParams.content">
+                                    <td class="check-input">
+                                        <!--<span><input type="checkbox" id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>-->
+                                        <span ng-bind="$index+1"></span>
+                                    </td>
+                                    <td style="padding-left: 10px;">
+                                        <div class="text-more">品牌:&nbsp;<em title="{{batchCommodity.b2cBranden || '空'}}" ng-bind="batchCommodity.b2cBranden || '空'"></em></div>
+                                        <div class="text-more">物料名称:&nbsp;<em title="{{batchCommodity.kindName || '空'}}" ng-bind="batchCommodity.kindName || '空'"></em></div>
+                                        <div class="text-more">型号:&nbsp;<em title="{{batchCommodity.b2cCode || '空'}}" ng-bind="batchCommodity.b2cCode || '空'"></em></div>
+                                        <div class="text-more">规格:&nbsp;<em title="{{batchCommodity.spec || '空'}}" ng-bind="batchCommodity.spec || '空'"></em></div>
+                                    </td>
+                                    <td>
+                                        <!--<div>类型:&nbsp;<span ng-bind="batchCommodity.original == 1311 ? '现货' : '呆滞库存' "></span></div>-->
+                                        <div>成本单价:&nbsp;<span ng-bind="batchCommodity.costPrice"></span></div>
+                                        <!--<div>封装:&nbsp;<span ng-bind="batchCommodity.encapsulation || '无封装信息'"></span></div>-->
+                                        <div>包装:&nbsp;<span ng-bind="batchCommodity.packaging || '无包装信息'"></span></div>
+                                        <div>
+                                            <span class="label-commodity">交期:</span>
+                                            <span>
+                                                 <span ng-if="batchCommodity.selfMinDelivery == batchCommodity.selfMaxDelivery" ng-bind="batchCommodity.selfMaxDelivery"></span>
+                                                 <span ng-if="batchCommodity.selfMinDelivery != batchCommodity.selfMaxDelivery" ng-bind="batchCommodity.selfMinDelivery + '-' + batchCommodity.selfMaxDelivery"></span>
+                                            </span>
+                                        </div>
+                                    </td>
+                                    <td>
+                                        <div>库存:&nbsp;<span ng-bind="batchCommodity.reserve | number"></span></div>
+                                        <div>最小起订量:&nbsp;<span ng-bind="batchCommodity.minBuyQty | number"></span></div>
+                                        <div>最小包装数:&nbsp;<span ng-bind="batchCommodity.minPackage | number"></span></div>
+                                        <!--<div>倍数/价格:&nbsp;-->
+                                        <!--<span ng-bind="batchCommodity.minBuyQty | number"></span>-->
+                                        <!--<span ng-if="batchCommodity.usdMinPackPrice">-->
+                                        <!--/<span ng-bind="batchCommodity.usdMinPackPrice | formateNumber : 6 | currencySysmbol : 'USD'"></span>-->
+                                        <!--</span>-->
+                                        <!--<span ng-if="batchCommodity.rmbMinPackPrice">-->
+                                        <!--/<span ng-bind="batchCommodity.rmbMinPackPrice | formateNumber : 6 | currencySysmbol : 'RMB'"></span>-->
+                                        <!--</span>-->
+                                        <!--</div>-->
+                                        <!--<div>样品:&nbsp;<span ng-bind="batchCommodity.sampleqty | number"></span></div>-->
+                                        <div>
+                                            <span ng-bind="batchCommodity.breakUp ? '可拆卖' : '不可拆卖'"></span>
+                                            <!--<span class="switch"><button ng-class="{'active' : commodity.editBreakUp}" ng-click="toggleIsBreadUp(commodity)"></button></span>-->
+                                        </div>
+                                    </td>
+                                    <td style="vertical-align: top !important;">
+                                        <div ng-repeat="price in batchCommodity.prices">{{price.start + '+'}}</div>
+                                    </td>
+                                    <td style="vertical-align: top !important;">
+                                        <div ng-repeat="price in batchCommodity.prices">{{batchCommodity.currency=='RMB' ? price.rMBPrice : price.uSDPrice}}</div>
+                                    </td>
+                                    <td>
+                                        <!--<a ng-click="editBatch(batchCommodity)">编辑</a><br/>-->
+                                        <!--<a ng-click="deleteBatch(batchCommodity.id)">删除</a>-->
+                                        <a name = 'delete-material' ng-click="showDelete(batchCommodity)">删除</a>
+                                    </td>
+                                </tr>
+                                <tr class="record-number" ng-if="pageParams.content.length > 0">
+                                    <td colspan="7">
+                                        <div>显示 <i ng-bind="pageParams.start"></i>- <i ng-bind="pageParams.end">10</i> 个,共:<i style="color: #5078cb;" ng-bind="pageParams.totalElements"></i> 个</div>
+                                    </td>
+                                </tr>
+                                </tbody>
+                                <tbody class="no-record-list" ng-if="!pageParams || !pageParams.content || pageParams.content.length == 0">
+                                <tr class="height200">
+                                    <td colspan="7" style="background: #fff;"><img src="static/img/all/empty-cart.png"><span class="f14">暂无产品信息,赶快上传让更多人看到你的产品吧</span></td>
+                                </tr>
+                                </tbody>
+                            </table>
+                        </div>
+                        <div style="margin-top: -40px;" ng-if="$$productOn.tab == 'bathOn'&& isPcbStore">3、如核对信息无误之后,点击确认发布</div>
+                        <div ng-show="$$productOn.tab == 'bathOn' && isPcbStore">
+                            <span class="blue-bg publish" href="javascript:void(0)" ng-click="publish($event)" ng-disabled="!pageParams.totalElements"><span>确认上架</span></span>
+                            <b class="tip" >* 上架成功30分钟后,方可被客户搜索到,并在公司产品库展示。</b>
+                        </div>
+                    </div>
+                </div>
+                <!--<div class="load_next">-->
+                    <!--<p ng-class="{'border-none':open03}">第三步,批量化匹配不成功产品信息下载-->
+                        <!--<em class="open-icon" ng-click="open03=!open03" ng-class="{'active': !open03}"></em>-->
+                    <!--</p>-->
+                    <!--<div class="add_category" ng-if="!open03">-->
+                        <!--<div>文件包含验证不通过的内容信息,请修改其错误信息再重新上传</div>-->
+                        <!--<div class="load_tab">-->
+                            <!--<a href="javascript:void(0)" style="width: 206px;" ng-disabled="!result.failure" ng-click="downloadExcel()" class="blue-bg">下载匹配不成功产品信息</a>-->
+                <form id="load-error" style="display: none;" method="get">
+                    <input type="hidden" name="batch" ng-value="result.batch">
+                    <input type="hidden" name="isPerson" ng-value="1" ng-if="$$productOn.tab === 'bathOnPerson'">
+                    <input type="hidden" name="currency" ng-value="batch.currency">
+                </form>
+                        <!--</div>-->
+                    <!--</div>-->
+                <!--</div>-->
+                <!--防误删弹出框-->
+                <!--<div class="com-del-box" ng-show="deletePop">-->
+                    <!--<div class="title">-->
+                        <!--<a ng-click="cancelDelete()"><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="cancelDelete()">取消</a><a ng-click="deleteBatch(deleteId)">确认</a></div>-->
+                    <!--</div>-->
+                <!--</div>-->
+                <div class="com-modal-wrap" ng-if="result && !hadImport && $$productOn.tab == 'bathOnPerson' && personMedol">
+                    <div class="com-del-box com-mall-del-box">
+                        <div class="title">
+                            <i ng-click="setPersonMedol()"></i>
+                        </div>
+                        <p><img src="static/img/product/check.png" alt="">上传产品成功!</p>
+                        <div class="result">成功上传<span ng-bind="result.success + result.failure">600</span>个产品(其中标准产品<span ng-bind="result.success">200</span>个,非标产品<span ng-bind="result.failure">300</span>个),下载<a ng-click="downloadExcel()">上传失败产品</a></div>
+                        <div class="operate">
+                            <span ng-click="setPersonMedol()">留在当前页</span>
+                            前往 <a ui-sref="vendor_material_person">我的产品库 <i class="fa fa-long-arrow-right"></i></a>
+                        </div>
+                    </div>
+                </div>
+                <div class="com-modal-wrap" ng-if="showSelfSellRemindBox">
+                    <div class="type-remind-box com-mall-del-box">
+                        <div class="title">
+                            <i ng-click="setShowSelfSellRemindBox(false, 'no')"></i>
+                        </div>
+                        <div class="result"><span>选择寄售,</span>产品将由优软统一售卖,不会出现在您的自营店铺,是否切换?</div>
+                        <div class="operate">
+                            <a href="javascript:void(0)" ng-click="setShowSelfSellRemindBox(false)">是</a>
+                            <a href="javascript:void(0)" ng-click="setShowSelfSellRemindBox(false, 'no')">否</a>
+                        </div>
+                    </div>
+                </div>
+            </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 src=""></div>
+        </div>
+    </div>
+</div>
+
+<!-- 弹窗进度条加载 -->
+<div class="FixedCanvas" ng-show="showCanvas">
+    <div class="fix">
+        <canvas id="canvas" width="100" height="100"></canvas>
+        <div class="infoTEXT">上传中,请不要离开....</div>
+    </div>
+</div>
+
+<style>
+    .FixedCanvas {
+        position: fixed;
+        left: 0;
+        top: 0;
+        z-index: 111;
+        width: 100%;
+        height: 100%;
+        /*background: rgba(0, 0, 0, 0.3);*/
+        text-align: center;
+        /*transition: all 0.3s;*/
+    }
+    .FixedCanvas .fix {
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        margin-left: -50px;
+        margin-top: -60px;
+    }
+    #canvas {
+        margin: 5% auto 0;
+    }
+    .infoTEXT {
+        font-size: 18px;
+        color: #333;
+        margin-top: 10px;
+    }
+</style>

+ 1 - 1
src/main/webapp/resources/view/usercenter/left_nav.html

@@ -41,7 +41,7 @@
                     <li ng-class="{'active' : active == 'buyer_order'}"><a  ui-sref="buyer_order">采购订单</a></li>
                     <li ng-class="{'active' : active == 'buyer_pay_center'}"><a  ui-sref="pay_center">应付对账</a></li>
                     <li ng-class="{'active' : active == 'buyer_invoice'}"><a  ui-sref="buyer_no_invoice">发票管理</a></li>
-                    <li ng-class="{'active' : active == 'vendor_productOn'}" ng-if="personage && !isPcbStore"><a  ui-sref="vendor_upload">产品导入</a></li>
+                    <li ng-class="{'active' : active == 'vendor_upload'}" ng-if="personage && !isPcbStore"><a  ui-sref="vendor_upload">产品导入</a></li>
                 </div>
                 <!--<div ng-hide="!(userInfo.pwdEnable && userInfo.haveUserQuestion &&  userInfo.emailValidCode && userInfo.emailValidCode == 2)">-->
                     <!--<li ng-class="{'active' : active == 'buyer_order'}"><a  ui-sref="buyer_order">订单中心</a></li>-->