添加效验
Showing
11 changed files
with
227 additions
and
89 deletions
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
... | @@ -4,89 +4,99 @@ | ... | @@ -4,89 +4,99 @@ |
4 | * @author: renchao | 4 | * @author: renchao |
5 | */ | 5 | */ |
6 | export function formValidate (djlx) { | 6 | export function formValidate (djlx) { |
7 | switch (djlx) { | 7 | var formRules={ |
8 | case "100": | 8 | 'ygdj.sfczjzhxz': [ |
9 | return fristValidate(); | 9 | { required: false, message: '是否禁止或者限制转让约定:', trigger: 'blur' } |
10 | case "200": | 10 | ], |
11 | return transferValidate(); | 11 | 'ygdj.qdjg': [ |
12 | case "300": | 12 | { required: false, message: '被担保主债权数额:', trigger: 'blur' } |
13 | return changeValidate(); | 13 | ], |
14 | case "400": | 14 | 'ygdj.zwlxqssj': [ |
15 | return logoutValidate(); | 15 | { required: false, message: '债务履行起始时间:', trigger: 'blur' } |
16 | case "500": | 16 | ], |
17 | return riviseValidate(); | 17 | 'ygdj.zwlxjssj': [ |
18 | case "901": | 18 | { required: false, message: '债务履行结束时间:', trigger: 'blur' } |
19 | return renewalValidate(); | 19 | ], |
20 | case "902": | 20 | 'ygdj.djyy': [ |
21 | return replaceValidate(); | 21 | { required: false, message: '请输入登记原因', trigger: 'blur' } |
22 | ], | ||
23 | 'ygdj.zxyy': [ | ||
24 | { required: false, message: '请输入注销登记原因', trigger: 'blur' } | ||
25 | ] | ||
26 | } | ||
27 | if (djlx=="400") { | ||
28 | formRules["ygdj.zxyy"][0].required=true; | ||
29 | }else{ | ||
30 | formRules["ygdj.sfczjzhxz"][0].required=true; | ||
31 | formRules["ygdj.qdjg"][0].required=true; | ||
32 | formRules["ygdj.zwlxqssj"][0].required=true; | ||
33 | formRules["ygdj.zwlxjssj"][0].required=true; | ||
34 | formRules["ygdj.djyy"][0].required=true; | ||
35 | } | ||
36 | return formRules; | ||
22 | } | 37 | } |
23 | } | ||
24 | 38 | ||
25 | /** | 39 | /** |
26 | * @description: 首次登记效验 | 40 | * @description: 首次登记效验 |
27 | * @param {*} data | 41 | * @param {*} data |
28 | * @author: renchao | 42 | * @author: renchao |
29 | */ | 43 | */ |
30 | export function fristValidate () { | 44 | export function fristValidate (formRules,dyfs) { |
31 | var formRules={ | 45 | |
32 | 'diyaq.djyy': [ | ||
33 | { required: true, message: '请输入登记原因', trigger: 'blur' } | ||
34 | ] | ||
35 | } | ||
36 | return formRules; | 46 | return formRules; |
37 | } | 47 | } |
38 | 48 | ||
39 | 49 | ||
40 | /** | 50 | /** |
41 | * @description: 转移登记效验 | 51 | * @description: 转移登记效验 |
42 | * @param {*} data | 52 | * @param {*} data |
43 | * @author: renchao | 53 | * @author: renchao |
44 | */ | 54 | */ |
45 | export function transferValidate (data) { | 55 | export function transferValidate (data) { |
46 | 56 | ||
47 | } | 57 | } |
48 | 58 | ||
49 | /** | 59 | /** |
50 | * @description: 变更登记效验 | 60 | * @description: 变更登记效验 |
51 | * @param {*} data | 61 | * @param {*} data |
52 | * @author: renchao | 62 | * @author: renchao |
53 | */ | 63 | */ |
54 | export function changeValidate (data) { | 64 | export function changeValidate (data) { |
55 | 65 | ||
56 | } | 66 | } |
57 | 67 | ||
58 | /** | 68 | /** |
59 | * @description: 注销登记效验 | 69 | * @description: 注销登记效验 |
60 | * @param {*} data | 70 | * @param {*} data |
61 | * @author: renchao | 71 | * @author: renchao |
62 | */ | 72 | */ |
63 | export function logoutValidate (data) { | 73 | export function logoutValidate (data) { |
64 | 74 | ||
65 | } | 75 | } |
66 | 76 | ||
67 | /** | 77 | /** |
68 | * @description: 更正登记效验 | 78 | * @description: 更正登记效验 |
69 | * @param {*} data | 79 | * @param {*} data |
70 | * @author: renchao | 80 | * @author: renchao |
71 | */ | 81 | */ |
72 | export function riviseValidate (data) { | 82 | export function riviseValidate (data) { |
73 | 83 | ||
74 | } | 84 | } |
75 | 85 | ||
76 | /** | 86 | /** |
77 | * @description: 补证登记效验 | 87 | * @description: 补证登记效验 |
78 | * @param {*} data | 88 | * @param {*} data |
79 | * @author: renchao | 89 | * @author: renchao |
80 | */ | 90 | */ |
81 | export function renewalValidate (data) { | 91 | export function renewalValidate (data) { |
82 | 92 | ||
83 | } | 93 | } |
84 | 94 | ||
85 | /** | 95 | /** |
86 | * @description: 换证登记效验 | 96 | * @description: 换证登记效验 |
87 | * @param {*} data | 97 | * @param {*} data |
88 | * @author: renchao | 98 | * @author: renchao |
89 | */ | 99 | */ |
90 | export function replaceValidate (data) { | 100 | export function replaceValidate (data) { |
91 | 101 | ||
92 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
102 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | /** | ||
2 | * @description: 首次登记效验 | ||
3 | * @param {*} data | ||
4 | * @author: renchao | ||
5 | */ | ||
6 | export function formValidate (djlx,dyfs) { | ||
7 | var formRules={ | ||
8 | 'diyaqList[0].djyy': [ | ||
9 | { required: false, message: '请输入登记原因', trigger: 'blur' } | ||
10 | ], | ||
11 | 'diyaqList[0].zxdyyy': [ | ||
12 | { required: false, message: '请输入注销登记原因', trigger: 'blur' } | ||
13 | ], | ||
14 | 'diyaqList[0].zwlxqssj': [ | ||
15 | { required: false, message: '请选择债务履行起始时间', trigger: 'blur' } | ||
16 | ], | ||
17 | 'diyaqList[0].zwlxjssj': [ | ||
18 | { required: false, message: '请选择债务履行起始时间', trigger: 'blur' } | ||
19 | ], | ||
20 | 'diyaqList[0].bdbzzqse': [ | ||
21 | { required: false, message: '请输入被担保主债权数额', trigger: 'blur' } | ||
22 | ], | ||
23 | 'diyaqList[0].zgzqse': [ | ||
24 | { required: false, message: '请输入最高债权额', trigger: 'blur' } | ||
25 | ], | ||
26 | 'diyaqList[0].sfczjzhxz': [ | ||
27 | { required: false, message: '请输入最高债权额', trigger: 'blur' } | ||
28 | ] | ||
29 | } | ||
30 | |||
31 | if (djlx=="400") { | ||
32 | formRules["diyaqList[0].zxdyyy"][0].required=true; | ||
33 | }else{ | ||
34 | if(dyfs=="1"){ | ||
35 | formRules["diyaqList[0].bdbzzqse"][0].required=true; | ||
36 | }else{ | ||
37 | formRules["diyaqList[0].zgzqse"][0].required=true; | ||
38 | } | ||
39 | formRules["diyaqList[0].zwlxqssj"][0].required=true; | ||
40 | formRules["diyaqList[0].zwlxjssj"][0].required=true; | ||
41 | formRules["diyaqList[0].sfczjzhxz"][0].required=true; | ||
42 | formRules["diyaqList[0].djyy"][0].required=true; | ||
43 | } | ||
44 | console.log(formRules); | ||
45 | return formRules; | ||
46 | } | ||
47 | |||
48 | /** | ||
49 | * @description: 首次登记效验 | ||
50 | * @param {*} data | ||
51 | * @author: renchao | ||
52 | */ | ||
53 | export function fristValidate (formRules,dyfs) { | ||
54 | |||
55 | return formRules; | ||
56 | } | ||
57 | |||
58 | |||
59 | /** | ||
60 | * @description: 转移登记效验 | ||
61 | * @param {*} data | ||
62 | * @author: renchao | ||
63 | */ | ||
64 | export function transferValidate (data) { | ||
65 | |||
66 | } | ||
67 | |||
68 | /** | ||
69 | * @description: 变更登记效验 | ||
70 | * @param {*} data | ||
71 | * @author: renchao | ||
72 | */ | ||
73 | export function changeValidate (data) { | ||
74 | |||
75 | } | ||
76 | |||
77 | /** | ||
78 | * @description: 注销登记效验 | ||
79 | * @param {*} data | ||
80 | * @author: renchao | ||
81 | */ | ||
82 | export function logoutValidate (data) { | ||
83 | |||
84 | } | ||
85 | |||
86 | /** | ||
87 | * @description: 更正登记效验 | ||
88 | * @param {*} data | ||
89 | * @author: renchao | ||
90 | */ | ||
91 | export function riviseValidate (data) { | ||
92 | |||
93 | } | ||
94 | |||
95 | /** | ||
96 | * @description: 补证登记效验 | ||
97 | * @param {*} data | ||
98 | * @author: renchao | ||
99 | */ | ||
100 | export function renewalValidate (data) { | ||
101 | |||
102 | } | ||
103 | |||
104 | /** | ||
105 | * @description: 换证登记效验 | ||
106 | * @param {*} data | ||
107 | * @author: renchao | ||
108 | */ | ||
109 | export function replaceValidate (data) { | ||
110 | |||
111 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
... | @@ -3,90 +3,107 @@ | ... | @@ -3,90 +3,107 @@ |
3 | * @param {*} data | 3 | * @param {*} data |
4 | * @author: renchao | 4 | * @author: renchao |
5 | */ | 5 | */ |
6 | export function formValidate (djlx) { | 6 | export function formValidate (djlx,dyfs) { |
7 | switch (djlx) { | 7 | var formRules={ |
8 | case "100": | 8 | 'diyaq.djyy': [ |
9 | return fristValidate(); | 9 | { required: false, message: '请输入登记原因', trigger: 'blur' } |
10 | case "200": | 10 | ], |
11 | return transferValidate(); | 11 | 'diyaq.zxdyyy': [ |
12 | case "300": | 12 | { required: false, message: '请输入注销登记原因', trigger: 'blur' } |
13 | return changeValidate(); | 13 | ], |
14 | case "400": | 14 | 'diyaq.zwlxqssj': [ |
15 | return logoutValidate(); | 15 | { required: false, message: '请选择债务履行起始时间', trigger: 'blur' } |
16 | case "500": | 16 | ], |
17 | return riviseValidate(); | 17 | 'diyaq.zwlxjssj': [ |
18 | case "901": | 18 | { required: false, message: '请选择债务履行起始时间', trigger: 'blur' } |
19 | return renewalValidate(); | 19 | ], |
20 | case "902": | 20 | 'diyaq.bdbzzqse': [ |
21 | return replaceValidate(); | 21 | { required: false, message: '请输入被担保主债权数额', trigger: 'blur' } |
22 | ], | ||
23 | 'diyaq.zgzqse': [ | ||
24 | { required: false, message: '请输入最高债权额', trigger: 'blur' } | ||
25 | ], | ||
26 | 'diyaq.sfczjzhxz': [ | ||
27 | { required: false, message: '请输入最高债权额', trigger: 'blur' } | ||
28 | ] | ||
29 | } | ||
30 | if (djlx=="400") { | ||
31 | formRules["diyaq.zxdyyy"][0].required=true; | ||
32 | }else{ | ||
33 | if(dyfs=="1"){ | ||
34 | formRules["diyaq.bdbzzqse"][0].required=true; | ||
35 | }else{ | ||
36 | formRules["diyaq.zgzqse"][0].required=true; | ||
37 | } | ||
38 | formRules["diyaq.zwlxqssj"][0].required=true; | ||
39 | formRules["diyaq.zwlxjssj"][0].required=true; | ||
40 | formRules["diyaq.sfczjzhxz"][0].required=true; | ||
41 | formRules["diyaq.djyy"][0].required=true; | ||
42 | } | ||
43 | return formRules; | ||
22 | } | 44 | } |
23 | } | ||
24 | 45 | ||
25 | /** | 46 | /** |
26 | * @description: 首次登记效验 | 47 | * @description: 首次登记效验 |
27 | * @param {*} data | 48 | * @param {*} data |
28 | * @author: renchao | 49 | * @author: renchao |
29 | */ | 50 | */ |
30 | export function fristValidate () { | 51 | export function fristValidate (formRules,dyfs) { |
31 | var formRules={ | 52 | |
32 | 'diyaq.djyy': [ | ||
33 | { required: true, message: '请输入登记原因', trigger: 'blur' } | ||
34 | ] | ||
35 | } | ||
36 | return formRules; | 53 | return formRules; |
37 | } | 54 | } |
38 | 55 | ||
39 | 56 | ||
40 | /** | 57 | /** |
41 | * @description: 转移登记效验 | 58 | * @description: 转移登记效验 |
42 | * @param {*} data | 59 | * @param {*} data |
43 | * @author: renchao | 60 | * @author: renchao |
44 | */ | 61 | */ |
45 | export function transferValidate (data) { | 62 | export function transferValidate (data) { |
46 | 63 | ||
47 | } | 64 | } |
48 | 65 | ||
49 | /** | 66 | /** |
50 | * @description: 变更登记效验 | 67 | * @description: 变更登记效验 |
51 | * @param {*} data | 68 | * @param {*} data |
52 | * @author: renchao | 69 | * @author: renchao |
53 | */ | 70 | */ |
54 | export function changeValidate (data) { | 71 | export function changeValidate (data) { |
55 | 72 | ||
56 | } | 73 | } |
57 | 74 | ||
58 | /** | 75 | /** |
59 | * @description: 注销登记效验 | 76 | * @description: 注销登记效验 |
60 | * @param {*} data | 77 | * @param {*} data |
61 | * @author: renchao | 78 | * @author: renchao |
62 | */ | 79 | */ |
63 | export function logoutValidate (data) { | 80 | export function logoutValidate (data) { |
64 | 81 | ||
65 | } | 82 | } |
66 | 83 | ||
67 | /** | 84 | /** |
68 | * @description: 更正登记效验 | 85 | * @description: 更正登记效验 |
69 | * @param {*} data | 86 | * @param {*} data |
70 | * @author: renchao | 87 | * @author: renchao |
71 | */ | 88 | */ |
72 | export function riviseValidate (data) { | 89 | export function riviseValidate (data) { |
73 | 90 | ||
74 | } | 91 | } |
75 | 92 | ||
76 | /** | 93 | /** |
77 | * @description: 补证登记效验 | 94 | * @description: 补证登记效验 |
78 | * @param {*} data | 95 | * @param {*} data |
79 | * @author: renchao | 96 | * @author: renchao |
80 | */ | 97 | */ |
81 | export function renewalValidate (data) { | 98 | export function renewalValidate (data) { |
82 | 99 | ||
83 | } | 100 | } |
84 | 101 | ||
85 | /** | 102 | /** |
86 | * @description: 换证登记效验 | 103 | * @description: 换证登记效验 |
87 | * @param {*} data | 104 | * @param {*} data |
88 | * @author: renchao | 105 | * @author: renchao |
89 | */ | 106 | */ |
90 | export function replaceValidate (data) { | 107 | export function replaceValidate (data) { |
91 | 108 | ||
92 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
109 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment