Commit 97fa2966 by chenwq

fix(warehouse): 添加批量上架前检查不可上架商品逻辑

在批量上架操作前增加对商品状态的检查,如果有状态为1002(不可上架)的商品,则提示错误并终止操作
1 parent 7cea7852
......@@ -442,6 +442,14 @@ export default {
// 点击批量上架
batchSale(item, isAll) {
// 筛选有没有不可上架的商品
const list = !isAll ? [item] : this.getAllData()
for (let i = 0; i < list.length; i++) {
if (list[i].shelvesStatus == 1002) {
this.$message.error('有商品不可上架')
return true
}
}
// 有未设置前端分类的
if (this.judgeCategory(item, isAll)) {
!isAll ? this.editCategory(item) : this.$message.error('有商品未设置前端分类')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!