|
|
@@ -245,6 +245,9 @@ define([ 'app/app' ], function(app) {
|
|
|
$scope.pageParams.totalPages = 0;
|
|
|
toaster.pop('error', response.data || response);
|
|
|
});
|
|
|
+ if ($rootScope.$$productOn.tab === 'bathOnPerson') {
|
|
|
+ publicPersonProduct();
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
// 下载模板
|
|
|
@@ -267,10 +270,6 @@ define([ 'app/app' ], function(app) {
|
|
|
|
|
|
//批量发布
|
|
|
$scope.publish = function(event) {
|
|
|
- if ( $rootScope.$$productOn.tab === 'bathOnPerson'){
|
|
|
- alert('ffff');
|
|
|
- return;
|
|
|
- }
|
|
|
if ($scope.pageParams.totalElements > 0) {
|
|
|
ReleaseProductByBatch.batchRelease({batch : $scope.result.batch}, null, function(data) {
|
|
|
if ($scope.needShowTip){
|
|
|
@@ -308,6 +307,38 @@ define([ 'app/app' ], function(app) {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ function publicPersonProduct() {
|
|
|
+ ReleaseProductByBatch.batchReleasePerson({batch : $scope.result.batch}, null, function(data) {
|
|
|
+ if ($scope.needShowTip){
|
|
|
+ $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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ // toaster.pop("success", "提示", "发布成功 :" + data.data + "条");
|
|
|
+ toaster.pop("success", "提示", "发布成功");
|
|
|
+ $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($scope.result && $scope.result.batch && $scope.result.filter) {
|