Commit 77ea2792 authored by yaya's avatar yaya

feat:修改发布拍品功能

parent 86055f01
...@@ -260,6 +260,7 @@ export default { ...@@ -260,6 +260,7 @@ export default {
* 保存 * 保存
*/ */
handleSave() { handleSave() {
debugger
if (this.goods.images.length === 0) { if (this.goods.images.length === 0) {
this.$message({ this.$message({
type: 'error', type: 'error',
...@@ -267,8 +268,27 @@ export default { ...@@ -267,8 +268,27 @@ export default {
}) })
return return
} }
this.goods.images = this.goods.images.join(';') if (this.goods.stock <= 0) {
this.$message({
type: 'error',
message: '库存需大于0!'
})
return
}
if (this.numType === 2 && this.goods.buyLimitNum <= 0) {
this.$message({
type: 'error',
message: '限购数量需大于0!'
})
return
}
if (this.itemImages) {
this.goods.images = this.itemImages.join(';')
} else {
this.goods.images = ''
}
this.$refs.goods.validate((valid) => { this.$refs.goods.validate((valid) => {
debugger
if (valid) { if (valid) {
if (this.numType === -1) { if (this.numType === -1) {
this.goods.buyLimitNum = -1 this.goods.buyLimitNum = -1
......
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