|
@@ -94,7 +94,7 @@ var myGoods = new Vue({
|
|
|
if(response.code == 0){
|
|
|
_this.isRequest = true;
|
|
|
_this.featuredNum = response.data.featuredNum;
|
|
|
- _this.forbid = response.data.listingFee === 1 ? true : false
|
|
|
+ _this.isForbid = response.data.listingFee === 1 ? true : false
|
|
|
var data = response.data.productPage;
|
|
|
if(data.results && data.results.length>0){
|
|
|
_this.productsList = data.results;
|
|
@@ -270,7 +270,7 @@ var myGoods = new Vue({
|
|
|
var _this = this;
|
|
|
if(this.isForbid){ return }
|
|
|
CAIMEI.Modal('确定下架该商品吗?','取消','确定',function () {
|
|
|
- SupplierApi.SupplierSoldOut({productIds:pros.productId},function (response) {
|
|
|
+ SupplierApi.SupplierSoldOut({productIds:pros.productId},function (response) {
|
|
|
if (response.code == 0){
|
|
|
CAIMEI.dialog('下架成功~');
|
|
|
_this.productsList = [];
|
|
@@ -286,13 +286,13 @@ var myGoods = new Vue({
|
|
|
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) {
|
|
|
+ SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:1,shopId:_this.shopId},function (response) {
|
|
|
if (response.code == 0){
|
|
|
CAIMEI.dialog('添加成功~');
|
|
|
_this.productsList = [];
|
|
|
_this.GetMyproductDataInfo();
|
|
|
}else{
|
|
|
- CAIMEI.Alert(response.msg,'确定');
|
|
|
+ CAIMEI.Alert(response.msg,'确定');
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -301,13 +301,13 @@ var myGoods = new Vue({
|
|
|
var _this = this;
|
|
|
if(this.isForbid){ return }
|
|
|
CAIMEI.Modal('是否把该商品从主推商品中删除?','取消','确定',function () {
|
|
|
- SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:0,shopId:_this.shopId},function (response) {
|
|
|
+ SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:0,shopId:_this.shopId},function (response) {
|
|
|
if (response.code == 0){
|
|
|
CAIMEI.dialog('删除成功~');
|
|
|
_this.productsList = [];
|
|
|
_this.GetMyproductDataInfo();
|
|
|
}else{
|
|
|
- CAIMEI.Alert(response.msg,'确定');
|
|
|
+ CAIMEI.Alert(response.msg,'确定');
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -325,17 +325,17 @@ var myGoods = new Vue({
|
|
|
if(this.isForbid){ return }
|
|
|
pros.isChecked = !pros.isChecked;
|
|
|
if(pros.isChecked){
|
|
|
- _this.checkList.push(pros);
|
|
|
- }else {
|
|
|
- _this.checkList.splice(_this.checkList.indexOf(pros), 1);
|
|
|
- };
|
|
|
- if( _this.checkList.length>0){
|
|
|
- _this.check = true;
|
|
|
- _this.isProductChecked = true;
|
|
|
- } else {
|
|
|
- _this.isProductChecked = false;
|
|
|
- _this.check = false;
|
|
|
- }
|
|
|
+ _this.checkList.push(pros);
|
|
|
+ }else {
|
|
|
+ _this.checkList.splice(_this.checkList.indexOf(pros), 1);
|
|
|
+ };
|
|
|
+ if( _this.checkList.length>0){
|
|
|
+ _this.check = true;
|
|
|
+ _this.isProductChecked = true;
|
|
|
+ } else {
|
|
|
+ _this.isProductChecked = false;
|
|
|
+ _this.check = false;
|
|
|
+ }
|
|
|
|
|
|
_this.updateCheckAllBtn();
|
|
|
},
|