|
|
@@ -29,7 +29,7 @@
|
|
29
|
29
|
<el-button type="primary" @click="addActivity">添加活动</el-button>
|
|
30
|
30
|
<span class="info">请点击添加活动</span>
|
|
31
|
31
|
</el-form-item>
|
|
32
|
|
- <el-form-item>
|
|
|
32
|
+ <!-- <el-form-item>
|
|
33
|
33
|
<span class="money">*</span>消费满
|
|
34
|
34
|
<el-input
|
|
35
|
35
|
style="width:90px;"
|
|
|
@@ -41,8 +41,8 @@
|
|
41
|
41
|
onkeyup="value=value.replace(/[^\d.]/g,'')"
|
|
42
|
42
|
style="width:90px;"
|
|
43
|
43
|
></el-input>元
|
|
44
|
|
- </el-form-item>
|
|
45
|
|
- <el-form-item v-for="(item,index) in addActivityData" :key="index">
|
|
|
44
|
+ </el-form-item> -->
|
|
|
45
|
+ <el-form-item v-for="(item,index) in addActivityData" :key="index" >
|
|
46
|
46
|
<span class="money">*</span>消费满
|
|
47
|
47
|
<el-input
|
|
48
|
48
|
style="width:90px;"
|
|
|
@@ -115,7 +115,10 @@ export default {
|
|
115
|
115
|
pickerOptions, //日期数据
|
|
116
|
116
|
sourceOptions: [], // 工单来源下拉数据
|
|
117
|
117
|
shopList: [], //绑定商品数据
|
|
118
|
|
- addActivityData: [], //添加活动的数据
|
|
|
118
|
+ addActivityData: [{
|
|
|
119
|
+ amountRange:'',
|
|
|
120
|
+ reductionAmount:'',
|
|
|
121
|
+ }], //添加活动的数据
|
|
119
|
122
|
ruleForm: {
|
|
120
|
123
|
unique_id: "", // 否 string callid
|
|
121
|
124
|
ordercode: "",
|
|
|
@@ -147,14 +150,14 @@ export default {
|
|
147
|
150
|
promotionMethod: [
|
|
148
|
151
|
{
|
|
149
|
152
|
required: true,
|
|
150
|
|
- trigger: "blur",
|
|
|
153
|
+ trigger: "change",
|
|
151
|
154
|
message: "请选择促销方式",
|
|
152
|
155
|
},
|
|
153
|
156
|
],
|
|
154
|
157
|
boundGoods: [
|
|
155
|
158
|
{
|
|
156
|
159
|
required: true,
|
|
157
|
|
- trigger: "blur",
|
|
|
160
|
+ trigger: "change",
|
|
158
|
161
|
message: "请选择商品标签",
|
|
159
|
162
|
},
|
|
160
|
163
|
],
|
|
|
@@ -183,6 +186,12 @@ export default {
|
|
183
|
186
|
this.reductionAmount.push(item.reductionAmount);
|
|
184
|
187
|
this.amountRange.push(item.amountRange);
|
|
185
|
188
|
});
|
|
|
189
|
+ if(this.reductionAmount.filter(i=>i&&i.trim()).length==0||this.amountRange.filter(i=>i&&i.trim()).length==0){
|
|
|
190
|
+ this.$message.error("请输入满减金额!");
|
|
|
191
|
+ this.reductionAmount = [];
|
|
|
192
|
+ this.amountRange = [];
|
|
|
193
|
+ return
|
|
|
194
|
+ }
|
|
186
|
195
|
} else {
|
|
187
|
196
|
this.$message.error("请输入满减金额!");
|
|
188
|
197
|
this.reductionAmount = [];
|
|
|
@@ -290,17 +299,17 @@ export default {
|
|
290
|
299
|
},
|
|
291
|
300
|
//添加活动方法
|
|
292
|
301
|
addActivity() {
|
|
293
|
|
- if (!this.ruleForm.amountRange || !this.ruleForm.reductionAmount) {
|
|
294
|
|
- this.$message.error("请填写金额数据");
|
|
295
|
|
- return;
|
|
296
|
|
- }
|
|
|
302
|
+ // if (!this.ruleForm.amountRange || !this.ruleForm.reductionAmount) {
|
|
|
303
|
+ // this.$message.error("请填写金额数据");
|
|
|
304
|
+ // return;
|
|
|
305
|
+ // }
|
|
297
|
306
|
this.addActivityData.push({
|
|
298
|
|
- amountRange: this.ruleForm.amountRange, //满减区间
|
|
299
|
|
- reductionAmount: this.ruleForm.reductionAmount, //满减金额
|
|
|
307
|
+ amountRange: '', //满减区间
|
|
|
308
|
+ reductionAmount: '', //满减金额
|
|
300
|
309
|
key: Date.now(),
|
|
301
|
310
|
});
|
|
302
|
|
- this.ruleForm.amountRange = "";
|
|
303
|
|
- this.ruleForm.reductionAmount = "";
|
|
|
311
|
+ // this.ruleForm.amountRange = "";
|
|
|
312
|
+ // this.ruleForm.reductionAmount = "";
|
|
304
|
313
|
},
|
|
305
|
314
|
//删除活动方法
|
|
306
|
315
|
removeActivity(itemId) {
|