机床客户信息 手机号校验、租户回显

This commit is contained in:
xusd 2024-11-12 14:38:10 +08:00
parent 1260d288a2
commit 1cb17d950a
2 changed files with 16 additions and 0 deletions

View File

@ -61,4 +61,7 @@ public class CustomerInfoRespVO {
@ExcelProperty("备注")
private String remark;
@Schema(description = "租户id")
private Long tenantId;
}

View File

@ -156,6 +156,15 @@ export default {
name: "CustomerInfoForm",
components: {},
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 {
areaTree: [],
areaTreeData: [],
@ -188,6 +197,10 @@ export default {
industryType: [
{ required: true, message: "请选择所属行业", trigger: "change" },
],
contactPhone: [
{ required: true, message: '请输入手机号码', trigger: 'blur' },
{ validator: validatePhoneNumber, trigger: 'blur' }
],
},
tenantLists: [],