|
@@ -44,7 +44,7 @@
|
|
|
</a-radio-group>
|
|
|
</a-form-item>
|
|
|
<a-form-item v-if="getFormData('budgetMode')=='BUDGET_MODE_DAY'" label="日预算" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
|
- <a-input-number :max="9999999.99" :step="0.1" v-decorator="['budget',{initialValue:1000 }]" @change="budgetChange" @blur='budgetBlur' />
|
|
|
+ <a-input-number :max="9999999.99" :step="1" v-decorator="['budget',{initialValue:1000 }]" @change="budgetChange" @blur='budgetBlur' />
|
|
|
<span class="tip" v-if="getFormData('budget')<1000">预算不少于1000.00元,不超过9999999.99元,请正确输入</span>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="广告主名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
@@ -231,10 +231,24 @@ export default {
|
|
|
},
|
|
|
//预算改变
|
|
|
budgetChange(val){
|
|
|
- // console.log(val)
|
|
|
+ console.log(val)
|
|
|
+ var strRegex = /^[0-9](.)+$/
|
|
|
+ var re = new RegExp(strRegex)
|
|
|
+ // console.log(re.test(res))
|
|
|
+ if (re.test(val)) {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ // return false
|
|
|
+ this.$message.error('请勿输入非数字!')
|
|
|
+ // let num = val.splice(val.length-2,1)
|
|
|
+ // this.form.setFieldsValue({
|
|
|
+ // budget:1000
|
|
|
+ // })
|
|
|
+ }
|
|
|
},
|
|
|
budgetBlur(e){
|
|
|
- console.log(e.target)
|
|
|
+ console.log(e.target.value)
|
|
|
+
|
|
|
if(e.target.value==0){
|
|
|
this.form.setFieldsValue({
|
|
|
budget:1000.0
|
|
@@ -257,15 +271,16 @@ export default {
|
|
|
console.log(res)
|
|
|
if(res.success){
|
|
|
this.nextLoading=false;
|
|
|
- this.$message.success('广告组创建成功,2s后将跳转到新建计划页面');
|
|
|
+ this.$message.success('广告组创建成功,1s后将跳转到新建计划页面');
|
|
|
values.id=res.campaign_id;
|
|
|
values.accountId=this.accountID
|
|
|
let groupInfo=JSON.stringify(values)
|
|
|
localStorage.setItem('groupInfo',groupInfo)
|
|
|
setTimeout(() => {
|
|
|
- this.$router.replace(`/modules/BatchCreate/newPlan`)
|
|
|
- },2000);
|
|
|
+ this.$router.push('/modules/BatchCreate/newPlan')
|
|
|
+ },1000);
|
|
|
}else{
|
|
|
+ this.nextLoading=false;
|
|
|
this.$message.error(res.message)
|
|
|
}
|
|
|
})
|
|
@@ -280,7 +295,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
goback(){
|
|
|
- this.$router.replace('/modules/BatchCreate/TouTiaoBatch')
|
|
|
+ this.$router.push('/modules/BatchCreate/TouTiaoBatch')
|
|
|
this.$bus.$emit('remove', '/modules/BatchCreate/newGroup')
|
|
|
},
|
|
|
|