|
|
@@ -255,7 +255,7 @@ export default {
|
|
|
{ required: true, message: '请选择领域', trigger: 'change'}
|
|
|
],
|
|
|
name:[
|
|
|
- { required: true, message: '请输入联系人', trigger: 'change'}
|
|
|
+ { required: true, message: '请输入联系人', trigger: 'change,blur'}
|
|
|
],
|
|
|
scale:[
|
|
|
{required: false,pattern:/^\d+(.\d{1,2})?$/, message: '请输入数字值', trigger: 'blur'}
|
|
|
@@ -400,18 +400,23 @@ export default {
|
|
|
},
|
|
|
/*联系人选择*/
|
|
|
contactSelect(val){
|
|
|
- this.param.content.name = val.name
|
|
|
- if (val.phonenumber.indexOf('-') != '-1'){
|
|
|
- this.param.content.isTelephone = '1'
|
|
|
- this.param.content.areaCode = val.phonenumber.substring(0,val.phonenumber.indexOf('-'))
|
|
|
- this.param.content.telephone = val.phonenumber.substring(this.param.content.areaCode.length+1)
|
|
|
- this.param.content.phonenumber = ''
|
|
|
+ if (val){
|
|
|
+ this.param.content.name = val.name
|
|
|
+ if (val.phonenumber.indexOf('-') != '-1'){
|
|
|
+ this.param.content.isTelephone = '1'
|
|
|
+ this.param.content.areaCode = val.phonenumber.substring(0,val.phonenumber.indexOf('-'))
|
|
|
+ this.param.content.telephone = val.phonenumber.substring(this.param.content.areaCode.length+1)
|
|
|
+ this.param.content.phonenumber = ''
|
|
|
+ }else {
|
|
|
+ this.param.content.isTelephone = '0'
|
|
|
+ this.param.content.phonenumber = val.phonenumber
|
|
|
+ this.param.content.areaCode = ''
|
|
|
+ this.param.content.telephone = ''
|
|
|
+ }
|
|
|
}else {
|
|
|
- this.param.content.isTelephone = '0'
|
|
|
- this.param.content.phonenumber = val.phonenumber
|
|
|
- this.param.content.areaCode = ''
|
|
|
- this.param.content.telephone = ''
|
|
|
+ this.param.content.name = this.$refs.contactsRef.name
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|