Commit 572b97b5 by cpa

商家端上下架完善。

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