问题描述:
商品列表门店数据显示不了
解决方法:
修改的文件: src/pages/product/productList/index.vue
修改 batchHandler 方法:
batchHandler(type) {
if (type == 1) {
// 批量上架
this.onShelves();
} else if (type == 2) {
// 批量下架
this.onDismount();
} else if (type == 3) {
// 强制下架
this.forcedRemovalShow = true;
} else if (type == 4) {
// 移到回收站
let data = {
data: {
is_del: 1,
},
type: 11,
ids: this.checkUidList,
all: this.isAll,
};
if (this.isAll == 1) {
data.where = this.artFrom;
}
batchProcess(data).then(res => {
this.$Message.success(res.msg);
this.getDataList();
this.allReset();
}).catch(res => {
this.$Message.error(res.msg);
});
} else if (type == 5) {
// 恢复商品
let data = {
data: {
is_del: 0,
},
type: 11,
ids: this.checkUidList,
all: this.isAll,
};
if (this.isAll == 1) {
data.where = this.artFrom;
}
batchProcess(data).then(res => {
this.$Message.success(res.msg);
this.getDataList();
this.allReset();
}).catch(res => {
this.$Message.error(res.msg);
});
} else if (type == 6) {
// 删除商品
let data = {
type: 12,
ids: this.checkUidList,
all: this.isAll,
};
if (this.isAll == 1) {
data.where = this.artFrom;
}
batchProcess(data).then(res => {
this.$Message.success(res.msg);
this.getDataList();
this.allReset();
}).catch(res => {
this.$Message.error(res.msg);
});
}
},
删除 created 中 this.batchOptions()
修改完成后需要重新打包,打包教程: https://doc.crmeb.com/pro/crmebprov3_2/21560