机床客户信息 手机号校验、租户回显
This commit is contained in:
parent
1260d288a2
commit
1cb17d950a
@ -61,4 +61,7 @@ public class CustomerInfoRespVO {
|
|||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
}
|
}
|
@ -156,6 +156,15 @@ export default {
|
|||||||
name: "CustomerInfoForm",
|
name: "CustomerInfoForm",
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
|
// 定义验证规则
|
||||||
|
var validatePhoneNumber = (rule, value, callback) => {
|
||||||
|
const reg = /^1[3|4|5|6|7|8|9][0-9]{9}$/
|
||||||
|
if (!reg.test(value)) {
|
||||||
|
callback(new Error('请输入有效的手机号码'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
areaTree: [],
|
areaTree: [],
|
||||||
areaTreeData: [],
|
areaTreeData: [],
|
||||||
@ -188,6 +197,10 @@ export default {
|
|||||||
industryType: [
|
industryType: [
|
||||||
{ required: true, message: "请选择所属行业", trigger: "change" },
|
{ required: true, message: "请选择所属行业", trigger: "change" },
|
||||||
],
|
],
|
||||||
|
contactPhone: [
|
||||||
|
{ required: true, message: '请输入手机号码', trigger: 'blur' },
|
||||||
|
{ validator: validatePhoneNumber, trigger: 'blur' }
|
||||||
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
tenantLists: [],
|
tenantLists: [],
|
||||||
|
Loading…
Reference in New Issue
Block a user