|
|
@@ -15,6 +15,7 @@ define([ 'app/app' ], function(app) {
|
|
|
$state.reload();
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
if ($location.$$search.type && $location.$$search.type == 'self') {
|
|
|
$rootScope.$$productOn.tab = 'bathOnPerson';
|
|
|
} else if ($location.$$search.type && $location.$$search.type == 'company'){
|
|
|
@@ -205,6 +206,16 @@ define([ 'app/app' ], function(app) {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+ // 返回店铺的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) {
|
|
|
@@ -280,6 +291,26 @@ define([ 'app/app' ], function(app) {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+ $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 true;
|
|
|
+ },
|
|
|
+ uuid: function () {
|
|
|
+ return $scope.storeUuid;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
// 下载模板
|
|
|
$scope.download = function() {
|
|
|
var show = SessionService.get($scope.userInfo.userUU + "-releasetip");
|
|
|
@@ -302,27 +333,25 @@ define([ 'app/app' ], function(app) {
|
|
|
$scope.publish = function(event) {
|
|
|
if ($scope.pageParams.totalElements > 0) {
|
|
|
ReleaseProductByBatch.batchRelease({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;
|
|
|
- }
|
|
|
+ $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;
|
|
|
}
|
|
|
- });
|
|
|
- return ;
|
|
|
- }
|
|
|
- // toaster.pop("success", "提示", "发布成功 :" + data.data + "条");
|
|
|
- toaster.pop("success", "提示", "发布成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
$scope.relTableParams.page(1);
|
|
|
$scope.relTableParams.reload();
|
|
|
$scope.result.success = 0;//设置成0,让前端用户不能点击
|
|
|
@@ -339,7 +368,7 @@ define([ 'app/app' ], function(app) {
|
|
|
|
|
|
function publicPersonProduct() {
|
|
|
ReleaseProductByBatch.batchReleasePerson({batch : $scope.result.batch}, null, function(data) {
|
|
|
- if ($scope.needShowTip){
|
|
|
+ if ($scope.needShowTip) {
|
|
|
$scope.relTableParams.page(1);
|
|
|
$scope.relTableParams.reload();
|
|
|
//$scope.result.success = 0;//设置成0,让前端用户不能点击
|
|
|
@@ -353,6 +382,12 @@ define([ 'app/app' ], function(app) {
|
|
|
},
|
|
|
tipModal : function() {
|
|
|
return true;
|
|
|
+ },
|
|
|
+ success : function () {
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ uuid: function () {
|
|
|
+ return null;
|
|
|
}
|
|
|
}
|
|
|
});
|