|
@@ -267,6 +267,7 @@ var myGoods = new Vue({
|
|
|
},
|
|
|
ItemDownshelf: function(pros){//下架商品
|
|
|
var _this = this;
|
|
|
+ if(this.isForbid){ return }
|
|
|
CAIMEI.Modal('确定下架该商品吗?','取消','确定',function () {
|
|
|
SupplierApi.SupplierSoldOut({productIds:pros.productId},function (response) {
|
|
|
if (response.code == 0){
|
|
@@ -282,6 +283,7 @@ var myGoods = new Vue({
|
|
|
AddPushHotFn: function(pros){//添加主页推荐
|
|
|
var _this = this;
|
|
|
var num = 4-this.featuredNum;
|
|
|
+ if(this.isForbid){ return }
|
|
|
CAIMEI.Modal('总共能添加4个主推商品,您还能添加'+num+'个确定将该商品添加为主推商品吗?','取消','确定',function () {
|
|
|
SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:1,shopId:_this.shopId},function (response) {
|
|
|
if (response.code == 0){
|
|
@@ -296,7 +298,8 @@ var myGoods = new Vue({
|
|
|
},
|
|
|
DeletePushHotFn: function(pros){//删除主页推荐
|
|
|
var _this = this;
|
|
|
- CAIMEI.Modal('是否把该商品从主推商品中删除?','取消','确定',function () {
|
|
|
+ if(this.isForbid){ return }
|
|
|
+ CAIMEI.Modal('是否把该商品从主推商品中删除?','取消','确定',function () {
|
|
|
SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:0,shopId:_this.shopId},function (response) {
|
|
|
if (response.code == 0){
|
|
|
CAIMEI.dialog('删除成功~');
|
|
@@ -306,16 +309,19 @@ var myGoods = new Vue({
|
|
|
CAIMEI.Alert(response.msg,'确定');
|
|
|
}
|
|
|
})
|
|
|
- })
|
|
|
+ })
|
|
|
},
|
|
|
pageLinkDetils: function(pros){//预览商品
|
|
|
+ if(this.isForbid){ return }
|
|
|
window.open('/product-'+pros.productId+'.html');
|
|
|
},
|
|
|
editGoodFn: function(pros){//编辑商品
|
|
|
+ if(this.isForbid){ return }
|
|
|
location.href ='/supplier/release.html?productId='+pros.productId+'&type=edit';
|
|
|
},
|
|
|
ischeck: function(pros){//为未选中的时候改变为true,反之为true
|
|
|
var _this = this;
|
|
|
+ if(this.isForbid){ return }
|
|
|
pros.isChecked = !pros.isChecked;
|
|
|
if(pros.isChecked){
|
|
|
_this.checkList.push(pros);
|
|
@@ -350,6 +356,7 @@ var myGoods = new Vue({
|
|
|
},
|
|
|
checkedAll: function() {
|
|
|
var _this = this;
|
|
|
+ if(this.isForbid){ return }
|
|
|
_this.isCheckedAll = !_this.isCheckedAll;
|
|
|
if(_this.isCheckedAll){
|
|
|
_this.isProductChecked = true
|