提交 978e82d8 编写于 作者: minghao.wu's avatar minghao.wu

fix: 参数判空

上级 21a3da8a
...@@ -705,6 +705,15 @@ ...@@ -705,6 +705,15 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.leastCount > 1">
<el-form-item label="递增方式" prop="incrType">
<el-col :span="24">
<el-radio size="mini" v-model="formData.incrType" label="2">倍数递增</el-radio>
<el-radio v-model="formData.incrType" label="1">1件递增</el-radio>
</el-col>
</el-form-item>
</div>
<div class="inline"> <div class="inline">
<el-form-item label="单次购买上限" prop="name" class="required-label"> <el-form-item label="单次购买上限" prop="name" class="required-label">
<el-col :span="20"> <el-col :span="20">
...@@ -1000,13 +1009,13 @@ ...@@ -1000,13 +1009,13 @@
this.barAndGoodsFlag = this.formData1.medicalCategoryId ? true : false; this.barAndGoodsFlag = this.formData1.medicalCategoryId ? true : false;
// 判空 // 判空
if (this.formData.leastCount === '') { if (this.formData.leastCount == null || this.formData.leastCount === '') {
this.formData.leastCount = 1; this.formData.leastCount = 1;
} }
if (this.formData.mostCount === '') { if (this.formData.mostCount == null || this.formData.mostCount === '') {
this.formData.mostCount = -1; this.formData.mostCount = -1;
} }
if (this.formData.incrType === '') { if (this.formData.incrType == null || this.formData.incrType === '') {
this.formData.incrType = 1; this.formData.incrType = 1;
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册