|
@@ -22,8 +22,8 @@
|
|
|
id="promotionList-description"
|
|
|
v-model.trim="form.description"
|
|
|
allowClear
|
|
|
- placeholder="请输入促销简称(最多10个字符)"
|
|
|
- :maxLength="10"></a-input>
|
|
|
+ placeholder="请输入促销简称(最多20个字符)"
|
|
|
+ :maxLength="20"></a-input>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="规则门槛" prop="gateFlag">
|
|
|
<a-radio-group v-model="form.gateFlag" button-style="solid" size="small" @change="handleChange">
|
|
@@ -228,7 +228,15 @@ export default {
|
|
|
if (valid) {
|
|
|
// 验证必填
|
|
|
if (_this.form.gateFlag == '1') {
|
|
|
- if (!_this.form.gateAmount || !_this.form.quotaAmount) {
|
|
|
+ if (!_this.form.gateType) {
|
|
|
+ _this.$message.warning('请选择规则门槛设置类型!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!_this.form.gateAmount) {
|
|
|
+ _this.$message.warning('规则门槛条件不能为空!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (_this.form.gateType === 'FIXED_AMOUNT' && !_this.form.quotaAmount) {
|
|
|
_this.$message.warning('规则门槛条件不能为空!')
|
|
|
return
|
|
|
}
|
|
@@ -247,6 +255,9 @@ export default {
|
|
|
form.gateProductList = _this.$refs.cillProduct.getResultVal()
|
|
|
} else {
|
|
|
form.gateProductList = []
|
|
|
+ form.gateAmount = ''
|
|
|
+ form.quotaAmount = ''
|
|
|
+ form.gateType = undefined
|
|
|
}
|
|
|
form.specialProductList = _this.$refs.specialProduct.getResultVal()
|
|
|
form.promotionSn = _this.promotionSn
|