1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
| /**
| 初始化 公司信息
|
| **/
|
| (function(vc){
| vc.extends({
| data:{
| storeTypes:[],
| companyExtendInfo:{
| corporation:"",
| registeredCapital:"",
| foundingTime:"",
| registrationAuthority:"",
| scope:""
| }
| },
| _initMethod:function(){
|
| },
| _initEvent:function(){
| // vc.component.$on('errorInfoEvent',function(_errorInfo){
| // vc.component.registerInfo.errorInfo = _errorInfo;
| // console.log('errorInfoEvent 事件被监听',_errorInfo)
| // });
|
| },
| watch:{
| companyExtendInfo:{
| deep: true,
| handler:function(){
| vc.component.$emit('companyExtendEvent',vc.component.companyExtendInfo);
| }
| }
| },
| methods:{
| validateExtend:function(){
| return vc.validate.validate({
| companyExtendInfo:vc.component.companyExtendInfo
| },{
| 'companyExtendInfo.corporation':[
| {
| limit:"required",
| param:"",
| errInfo:"法人不能为空"
| },
| {
| limit:"maxLength",
| param:"50",
| errInfo:"法人长度必须在50位之内"
| },
| ],
| 'companyExtendInfo.registeredCapital':[
| {
| limit:"required",
| param:"",
| errInfo:"注册资本不能为空"
| },
| {
| limit:"num",
| param:"50",
| errInfo:"注册资本必须是数字"
| },
| ],
| 'companyExtendInfo.foundingTime':[
| {
| limit:"required",
| param:"",
| errInfo:"成立时间不能为空"
| },
| {
| limit:"date",
| param:"",
| errInfo:"不是有效的日期,例如:2019-03-29"
| }
| ],
| 'companyExtendInfo.registrationAuthority':[
| {
| limit:"required",
| param:"",
| errInfo:"登记机关不能为空"
| },
| {
| limit:"maxLength",
| param:"50",
| errInfo:"登记机关长度必须在50位之内"
| }
| ],
| 'companyExtendInfo.scope':[
| {
| limit:"required",
| param:"",
| errInfo:"经营范围不能为空"
| },
| {
| limit:"maxLength",
| param:"50",
| errInfo:"经营范围长度必须在50位之内"
| }
| ],
|
| });
| }
|
| }
|
| });
|
| })(window.vc);
|
|