Commit 572b97b5 by cpa

商家端上下架完善。

parent 971e1f30
......@@ -244,7 +244,6 @@
if(this.zmRes(r).skus){
this.form=this.zmRes(r)
}
}).catch(r => {
this.loading = false
this.error('加载信息失败')
......
......@@ -178,8 +178,7 @@
</template>
<script>
let DBG = false
let DBG = true
import {
ZmMixin
......
......@@ -162,13 +162,7 @@
return
}
let a = d.map(r => { return r.stateName }).join(',')
if(a.search('平台下架') != -1){
this.$message.error('平台下架商品,无法操作')
return;
}else if(a.search('有效') != -1) {
this.$message.error('商品已经上架')
return;
}else {
if(a.search('下架') != -1){
let ids = d.map(r => { return r.id }).join(',')
this.$confirm('请确认是否上架已勾选的商品', '提示', {
confirmButtonText: '确定',
......@@ -180,6 +174,15 @@
this.$message.success('上架成功')
this.getList(this.page)
})
}else if(a.search('审核中') != -1){
this.$message.error('只作用于商家下架的商品,已经上架正在审核')
return;
}else if (a.search('平台下架') != -1){
this.$message.error('只作用于商家下架的商品,平台下架商品。')
return;
}else if(a.search('有效') != -1) {
this.$message.error('只作用于商家下架的商品,商品已经上架。')
return;
}
},
......@@ -192,13 +195,7 @@
}
let a = d.map(r => { return r.stateName }).join(',')
if(a.search('平台下架') != -1){
this.$message.error('只能下架,上架商品')
return;
}else if(a.search('下架') != -1){
this.$message.error('商品已经下架')
return;
} else if(a.search('审核中') != -1){
if(a.search('有效') != -1){
let ids = d.map(r => { return r.id }).join(',')
this.$confirm('商品正在审核,是否确认下架', '提示', {
confirmButtonText: '确定',
......@@ -210,21 +207,20 @@
this.$message.success('下架成功')
this.getList(this.page)
})
}else {
let ids = d.map(r => { return r.id }).join(',')
this.$confirm('请确认是否下架已勾选的商品', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
return isNotUpon({ids: ids})
}).then(data => {
this.$message.success('下架成功')
this.getList(this.page)
})
}else if(a.search('下架') != -1){
this.$message.error('可作用于上架,商品已经下架。')
return;
}else if(a.search('平台下架') != -1){
this.$message.error('可作用于上架,商品审核拒绝。')
return;
}else if(a.search('审核中') != -1){
this.$message.error('可作用于上架,商品正在审核。')
return;
}
},
// 批量删除
handleDelBatch() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment