提交 716f5a39 编写于 作者: minghao.wu's avatar minghao.wu

fix: 限购条件

上级 e5bfb4d7
...@@ -743,6 +743,26 @@ ...@@ -743,6 +743,26 @@
</div> </div>
</el-form> </el-form>
<el-form
ref="formData"
:model="formData"
:rules="rules"
label-width="150px"
label-suffix=":"
class="basic-form"
>
<div class="basic-item-icon">
<div class="part-tit">限购条件</div>
<div class="inline">
<el-form-item>
<el-button size="small" type="primary" @click="addBuyingLimit"><i class="el-icon-plus"></i>限购条件</el-button>
</el-form-item>
</div>
</div>
</el-form>
<el-dialog <el-dialog
:title="stock.title" :title="stock.title"
:visible.sync="stockDio" :visible.sync="stockDio"
...@@ -1255,6 +1275,9 @@ ...@@ -1255,6 +1275,9 @@
placeholderTxt:txt placeholderTxt:txt
} }
this.stockDio = true this.stockDio = true
},
buyingLimit() {
}, },
complete() { complete() {
let formNameList = ['formData', 'formData1', 'formData2']; let formNameList = ['formData', 'formData1', 'formData2'];
...@@ -1505,10 +1528,15 @@ ...@@ -1505,10 +1528,15 @@
// 单次购买上限和最大购买数 // 单次购买上限和最大购买数
minusCount(type) { minusCount(type) {
if (type === 1) { if (type === 1) {
this.formData.leastCount -= 1 if (this.formData.leastCount > 2) {
this.formData.leastCount -= 1
}
} else if (type === 2) { } else if (type === 2) {
this.formData.mostCount -= 1 this.formData.mostCount -= 1
} }
if (this.formData.mostCount < this.formData.leastCount) {
this.formData.mostCount = this.formData.leastCount;
}
}, },
plusCount(type) { plusCount(type) {
if (type === 1) { if (type === 1) {
...@@ -1516,6 +1544,9 @@ ...@@ -1516,6 +1544,9 @@
} else if (type === 2) { } else if (type === 2) {
this.formData.mostCount += 1 this.formData.mostCount += 1
} }
if (this.formData.mostCount < this.formData.leastCount) {
this.formData.mostCount = this.formData.leastCount;
}
}, },
// 上传七牛 // 上传七牛
doUploadQiNiu(file){ doUploadQiNiu(file){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册