|
@@ -50,20 +50,6 @@ import { log } from '@antv/g2plot/lib/utils';
|
|
|
export default {
|
|
|
name: 'add',
|
|
|
data() {
|
|
|
- let phoneCheck = (rule,value,callback) => {
|
|
|
- if(!this.tool.checkPhoneFun(value)) {
|
|
|
- callback(new Error('请输入正确手机号'))
|
|
|
- }else {
|
|
|
- callback()
|
|
|
- }
|
|
|
- }
|
|
|
- let checkLength = (rule,value,callback) => {
|
|
|
- if(value && value.length > 25) {
|
|
|
- callback(new Error('字符限制在25个之内'))
|
|
|
- }else {
|
|
|
- callback()
|
|
|
- }
|
|
|
- }
|
|
|
return {
|
|
|
param: {
|
|
|
"classname": "saletool.orderclue.web.orderclue",
|
|
@@ -84,14 +70,14 @@ export default {
|
|
|
rules: {
|
|
|
phonenumber:[
|
|
|
{required:true,message:'请输入手机号',trigger:'blur'},
|
|
|
- {validator:phoneCheck,trigger:'blur'}
|
|
|
+ { pattern:/^1[3-9]\d{9}$/, message: '请输入正确手机号码',trigger: 'blur' }
|
|
|
],
|
|
|
province:[
|
|
|
{required:true,message:'内容不能为空',trigger:'blur'},
|
|
|
],
|
|
|
cluesource:[
|
|
|
{required:true,message:'内容不能为空',trigger:'blur'},
|
|
|
- {validator:checkLength,trigger:'blur'}
|
|
|
+ { min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
|
|
|
],
|
|
|
},
|
|
|
arealist:[],
|
|
@@ -167,12 +153,13 @@ export default {
|
|
|
type:'warning'
|
|
|
})
|
|
|
this.$api.requested(this.param).then( res => {
|
|
|
- this.tool.showMessage(res)
|
|
|
- this.$refs.ruleForm.resetFields()
|
|
|
- this.dialogVisible = false
|
|
|
- this.areaSelectResult = []
|
|
|
- this.$emit('updataList')
|
|
|
- this.$emit('getDetail')
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.areaSelectResult = []
|
|
|
+ this.$emit('updataList')
|
|
|
+ this.$emit('getDetail')
|
|
|
+ })
|
|
|
})
|
|
|
})
|
|
|
|